File tree Expand file tree Collapse file tree 2 files changed +31
-36
lines changed Expand file tree Collapse file tree 2 files changed +31
-36
lines changed Original file line number Diff line number Diff line change 1
- { pkgs ? import <nixpkgs> { } } :
2
1
let
3
- hsPkgs = import ./pkgs.nix { inherit pkgs ; } ;
2
+ overrideWith = override : default :
3
+ let
4
+ try = builtins . tryEval ( builtins . findFile builtins . nixPath override ) ;
5
+ in if try . success then
6
+ builtins . trace "using search host <${ override } >" try . value
7
+ else
8
+ default ;
4
9
in
5
- hsPkgs // {
6
- nix-tools-all-execs = pkgs . symlinkJoin
7
- { name = "nix-tools" ;
8
- paths = builtins . attrValues hsPkgs . nix-tools . components . exes ; } ;
9
- }
10
+
11
+ { pkgs ? import <nixpkgs> { }
12
+
13
+ # a different haskell infrastructure
14
+ , haskell ? import ( overrideWith "haskell"
15
+ ( pkgs . fetchFromGitHub { owner = "input-output-hk" ;
16
+ repo = "haskell.nix" ;
17
+ rev = "ed1dbc01f98411894f6613c62818f14b02fb6679" ;
18
+ sha256 = "0kbj4kb9rlvjb4afpcisz9zlk5z3h7frkwggfwri1q5683fapkgv" ;
19
+ name = "haskell-lib-source" ; } ) )
20
+ { inherit pkgs ; }
21
+ } :
22
+
23
+ let
24
+ hsPkgs = import ./pkgs.nix { inherit ( haskell ) mkPkgSet ; } ;
25
+ in
26
+ hsPkgs // {
27
+ nix-tools-all-execs = pkgs . symlinkJoin
28
+ { name = "nix-tools" ;
29
+ paths = builtins . attrValues hsPkgs . nix-tools . components . exes ; } ;
30
+ }
Original file line number Diff line number Diff line change 1
- { pkgs ? import <nixpkgs> { }
2
- } :
3
- let
4
- overrideWith = override : default :
5
- let
6
- try = builtins . tryEval ( builtins . findFile builtins . nixPath override ) ;
7
- in if try . success then
8
- builtins . trace "using search host <${ override } >" try . value
9
- else
10
- default ;
11
- in
1
+ { mkPkgSet } :
2
+
12
3
let
13
- # all packages from hackage as nix expressions
14
- hackage = import ( overrideWith "hackage"
15
- ( pkgs . fetchFromGitHub { owner = "angerman" ;
16
- repo = "hackage.nix" ;
17
- rev = "15155a37d3a40173b57e93b09453984fac614523" ;
18
- sha256 = "016538bfnlb0dxdga4n5p0m75zq0zymbdh5vrvr0gwsa7pywi7zy" ;
19
- name = "hackage-exprs-source" ; } ) )
20
- ;
21
- # a different haskell infrastructure
22
- haskell = import ( overrideWith "haskell"
23
- ( pkgs . fetchFromGitHub { owner = "angerman" ;
24
- repo = "haskell.nix" ;
25
- rev = "ed1dbc01f98411894f6613c62818f14b02fb6679" ;
26
- sha256 = "0kbj4kb9rlvjb4afpcisz9zlk5z3h7frkwggfwri1q5683fapkgv" ;
27
- name = "haskell-lib-source" ; } ) )
28
- hackage ;
29
4
30
5
# our packages
31
6
# this is generated with plan-to-nix
32
7
# $ cabal new-configure
33
8
# $ plan-to-nix ./dist-newstyle/cache/plan.json > plan.nix
34
9
plan = import ./plan.nix ;
35
10
36
- pkgSet = haskell . mkNewPkgSet {
37
- inherit pkgs ;
11
+ pkgSet = mkPkgSet {
38
12
pkg-def = plan ;
39
13
pkg-def-overlays = [
40
14
{ nix-tools = ./nix-tools.nix ;
You can’t perform that action at this time.
0 commit comments