forked from reflex-frp/reflex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
34 lines (34 loc) · 1.12 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
# Enter a shell for this project, with some choice of compiler. By default, we
# select the version of ghc provided by reflex-platform, but you can choose a
# later version from nixpkgs as well by doing:
# $ nix-shell --argstr compiler "ghc943"
{ compiler ? "reflex-platform" # or "ghc943", "ghc924"
}:
let
rp = import ./dep/reflex-platform { __useNewerCompiler = true; };
pkgs = rp.nixpkgs;
haskellLib = pkgs.haskell.lib;
system = builtins.currentSystem;
nixpkgsGhc = ((import ./nixpkgs {}).haskell.packages.${compiler}).override {
overrides = self: super: import ./overlay.nix { inherit self super haskellLib; } // {
hlint = self.callHackageDirect {
pkg = "hlint";
ver = "3.5";
sha256 = "1np43k54918v54saqqgnd82ccd6225njwxpg2031asi70jam80x9";
} {};
};
};
reflexEnv = if compiler == "reflex-platform"
then (import ./release.nix {}).${system}.ghc.reflex.env
else (nixpkgsGhc.callCabal2nix "reflex" (import ./src.nix) {}).env;
in
pkgs.mkShell {
name = "shell";
buildInputs = [
pkgs.cabal-install
pkgs.ghcid
];
inputsFrom = [
reflexEnv
];
}