-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
25 lines (25 loc) · 837 Bytes
/
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
let
nixpkgsJson = ./pins/nixpkgs.src-json;
fetchNixpkgs = import ./fetch-nixpkgs.nix;
in
{ ## 1. Provide pinned Nixpkgs
nixpkgs ? fetchNixpkgs nixpkgsJson
## 2. Choose a compiler
, compiler ? import ./default-compiler.nix
, withHoogle ? false
## 3. Choose extra packages
, pkgs ? import ./default-packages.nix
, trace ? false
, tracePatches ? trace
, traceOverrides ? trace
}:
let
nixpkgs' = import ./nixpkgs.nix
{ inherit compiler nixpkgs trace tracePatches traceOverrides; }; # Patched Nixpkgs with overlays.
ghc = nixpkgs'.haskell.packages."${compiler}"; # :: nixpkgs/pkgs/development/haskell-modules/make-package-set.nix
in with ghc;
shellFor {
packages = p: [];
withHoogle = withHoogle;
buildInputs = map (name: ghc."${name}") pkgs;
}