-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.nix
32 lines (30 loc) · 855 Bytes
/
project.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs { inherit config; };
compilerVersion = "ghc8104";
compilerSet = pkgs.haskell.packages."${compilerVersion}";
gitIgnore = pkgs.nix-gitignore.gitignoreSourcePure;
config = {
packageOverrides = super: let self = super.pkgs; in rec {
haskell = super.haskell // {
packageOverrides = self: super: {
turing-machine = super.callCabal2nix "turing-machine" (gitIgnore [./.gitignore] ./.) {};
};
};
};
};
in {
inherit pkgs;
shell = compilerSet.shellFor {
packages = p: [p.turing-machine];
buildInputs = with pkgs; [
compilerSet.cabal-install
haskellPackages.fourmolu
haskell-language-server
];
};
patchelf = compilerSet.shellFor {
packages = p: [];
buildInputs = [ pkgs.patchelf ];
};
}