-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
30 lines (26 loc) · 773 Bytes
/
Copy pathshell.nix
File metadata and controls
30 lines (26 loc) · 773 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
{ compiler ? "default"
, withHoogle ? true
, withProfiling ? false
}:
let
inherit (import <nixpkgs> {}) fetchFromGitHub;
pin-info = builtins.fromJSON (builtins.readFile ./nixpkgs.json);
pin-source = fetchFromGitHub {
inherit (pin-info) owner repo rev sha256;
};
pkgs = import pin-source { overlays = [ (import ./overlay.nix {inherit compiler withHoogle withProfiling; }) ]; };
drv =
pkgs.haskell.lib.addBuildDepends
(pkgs.haskellPackages.callCabal2nix "polysemy-examples" ./. {})
(with pkgs.haskellPackages;
[ apply-refact
cabal-install
cabal2nix
ghcid
hasktags
hindent
hlint
] ++ (with pkgs; [ git ])
);
in
if pkgs.lib.inNixShell then drv.env else drv