-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
45 lines (37 loc) · 1.02 KB
/
shell.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
33
34
35
36
37
38
39
40
41
42
43
44
45
{
package
, nixpkgs ? null
, compiler ? "ghc822"
}:
let
nixpkgs1 =
if nixpkgs == null
then let
bootstrap = import <nixpkgs> { };
location = builtins.fromJSON (builtins.readFile ./nixpkgs.json);
src = bootstrap.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
inherit (location) rev sha256;
};
in
import src
else nixpkgs;
pkgs = nixpkgs1 { };
release = (import ./release.nix) {nixpkgs = nixpkgs1; compiler = compiler;};
target = release.${package};
haskellPackages = pkgs.haskell.packages."${compiler}";
in
pkgs.lib.overrideDerivation target.env (old: {
buildInputs = old.buildInputs ++ [
haskellPackages.cabal-install
# haskellPackages.ghc-mod
haskellPackages.ghcid
# haskellPackages.hasktags
haskellPackages.hdevtools
haskellPackages.hindent
haskellPackages.hlint
haskellPackages.pointfree
haskellPackages.pointful
];
})