21 lines
553 B
Nix
21 lines
553 B
Nix
|
{
|
||
|
description = "A bare minimum Haskell flake";
|
||
|
|
||
|
inputs = {
|
||
|
flake-utils.url = "github:numtide/flake-utils";
|
||
|
};
|
||
|
|
||
|
outputs = { self, nixpkgs, flake-utils }:
|
||
|
flake-utils.lib.eachDefaultSystem (sys:
|
||
|
let pkgs = import nixpkgs { system = sys; };
|
||
|
hpkgs = pkgs.haskellPackages; # pkgs.haskell.ghc<VERSION>
|
||
|
project = hpkgs.callCabal2nix "my-cool-project" ./. {};
|
||
|
in {
|
||
|
packages.default = project;
|
||
|
devShells.default = pkgs.mkShell {
|
||
|
inputsFrom = [ project.env ];
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|