-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
31 lines (26 loc) · 861 Bytes
/
Copy pathdefault.nix
File metadata and controls
31 lines (26 loc) · 861 Bytes
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
let
nixpkgsRev = "0f5ce2fac0c7";
compilerVersion = "ghc865";
compilerSet = pkgs.haskell.packages."${compilerVersion}";
githubTarball = owner: repo: rev:
builtins.fetchTarball { url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; };
pkgs = import (githubTarball "NixOS" "nixpkgs" nixpkgsRev) { inherit config; };
gitIgnore = pkgs.nix-gitignore.gitignoreSourcePure;
config = {
packageOverrides = super: let self = super.pkgs; in rec {
haskell = super.haskell // {
packageOverrides = self: super: {
adventofcode2020 = super.callCabal2nix "adventofcode2020" (gitIgnore [./.gitignore] ./.) {};
};
};
};
};
in {
inherit pkgs;
shell = compilerSet.shellFor {
packages = p: [p.adventofcode2020];
buildInputs = with pkgs; [
compilerSet.cabal-install
];
};
}