File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 11
11
12
12
flagsAndConfig = field : xs : lib . optionalString ( xs != [ ] ) ''
13
13
echo ${ lib . concatStringsSep " " ( map ( x : "--${ field } =${ x } " ) xs ) } >> $out/configure-flags
14
- echo "${ field } : ${ lib . concatStringsSep " " xs } " >> $out/cabal.config
14
+ ${ lib . concatStrings ( map ( x : ''
15
+ echo "${ field } : ${ x } " >> $out/cabal.config
16
+ '' ) xs ) }
15
17
'' ;
16
18
17
19
target-pkg = "${ ghc . targetPrefix } ghc-pkg" ;
127
129
done
128
130
129
131
${ # Note: we pass `clear` first to ensure that we never consult the implicit global package db.
130
- flagsAndConfig "package-db" [ "clear" "$out/${ packageCfgDir } " ]
132
+ # However in `cabal.config` `cabal` requires `global` to be first.
133
+ flagsAndConfig "package-db" [ "clear" ]
131
134
}
135
+ echo "package-db: global" >> $out/cabal.config
136
+ ${ flagsAndConfig "package-db" [ "$out/${ packageCfgDir } " ] }
132
137
133
138
echo ${ lib . concatStringsSep " " ( lib . mapAttrsToList ( fname : val : "--flags=${ lib . optionalString ( ! val ) "-" + fname } " ) flags ) } >> $out/configure-flags
134
139
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ in recurseIntoAttrs {
30
30
} ;
31
31
32
32
# Used for testing externally with nix-shell (../tests.sh).
33
- test-shell = project . shellFor { tools = { cabal = "3.6.2.0 " ; } ; withHoogle = ! __elem compiler-nix-name [ "ghc901" "ghc902" "ghc921" "ghc922" "ghc923" "ghc924" ] ; } ;
33
+ test-shell = project . shellFor { tools = { cabal = "latest " ; } ; withHoogle = ! __elem compiler-nix-name [ "ghc901" "ghc902" "ghc921" "ghc922" "ghc923" "ghc924" ] ; } ;
34
34
35
35
run = stdenv . mkDerivation {
36
36
name = "cabal-simple-test" ;
Original file line number Diff line number Diff line change 23
23
packages = ps : with ps ; [ pkga pkgb ] ;
24
24
# This adds cabal-install to the shell, which helps tests because
25
25
# they use a nix-shell --pure. Normally you would BYO cabal-install.
26
- tools = { cabal = "3.2.0.0 " ; } ;
26
+ tools = { cabal = "latest " ; } ;
27
27
exactDeps = true ;
28
28
# Avoid duplicate package issues when runghc looks for packages
29
29
packageSetupDeps = false ;
34
34
packages = ps : with ps ; [ pkga ] ;
35
35
# This adds cabal-install to the shell, which helps tests because
36
36
# they use a nix-shell --pure. Normally you would BYO cabal-install.
37
- tools = { cabal = "3.2.0.0 " ; } ;
37
+ tools = { cabal = "latest " ; } ;
38
38
exactDeps = true ;
39
39
# Avoid duplicate package issues when runghc looks for packages
40
40
packageSetupDeps = false ;
46
46
# packages = ps: with ps; [ pkga pkgb ];
47
47
# This adds cabal-install to the shell, which helps tests because
48
48
# they use a nix-shell --pure. Normally you would BYO cabal-install.
49
- tools = { cabal = "3.2.0.0 " ; } ;
49
+ tools = { cabal = "latest " ; } ;
50
50
# Avoid duplicate package issues when runghc looks for packages
51
51
packageSetupDeps = false ;
52
52
} ;
You can’t perform that action at this time.
0 commit comments