File tree 6 files changed +35
-19
lines changed 6 files changed +35
-19
lines changed Original file line number Diff line number Diff line change 371
371
echo "package-id $id" >> $out/envDep
372
372
else
373
373
echo 'ERROR: ${ package . identifier . name } id could not be found with ${ target-pkg-and-db } '
374
- exit 0
374
+ exit 1
375
+ fi
376
+ if ver=$(${ target-pkg-and-db } field ${ package . identifier . name } version --simple-output); then
377
+ echo "constraint: ${ package . identifier . name } == $ver" >> $out/exactDep/cabal.config
378
+ echo "constraint: ${ package . identifier . name } installed" >> $out/exactDep/cabal.config
379
+ else
380
+ echo 'ERROR: ${ package . identifier . name } version could not be found with ${ target-pkg-and-db } '
381
+ exit 1
375
382
fi
376
383
''
377
384
else
@@ -389,17 +396,10 @@ let
389
396
echo "--dependency=${ package . identifier . name } :'' ${name#z-${ package . identifier . name } -z-}=$id" >> $out/exactDep/configure-flags
390
397
else
391
398
echo 'ERROR: ${ package . identifier . name } id could not be found with ${ target-pkg-and-db } '
392
- exit 0
399
+ exit 1
393
400
fi
394
401
'' )
395
402
}
396
- if ver=$(${ target-pkg-and-db } field ${ package . identifier . name } version --simple-output); then
397
- echo "constraint: ${ package . identifier . name } == $ver" >> $out/exactDep/cabal.config
398
- echo "constraint: ${ package . identifier . name } installed" >> $out/exactDep/cabal.config
399
- else
400
- echo 'ERROR: ${ package . identifier . name } version could not be found with ${ target-pkg-and-db } '
401
- exit 0
402
- fi
403
403
'' }
404
404
${ ( lib . optionalString ( haskellLib . isTest componentId || haskellLib . isBenchmark componentId ) ''
405
405
mkdir -p $out/bin
Original file line number Diff line number Diff line change 93
93
94
94
for l in "${ cfgFiles } "; do
95
95
if [ -n "$l" ]; then
96
- cp -f "$l/${ packageCfgDir } /"*.conf $out/${ packageCfgDir }
96
+ files=("$l/${ packageCfgDir } /"*.conf)
97
+ if (( '' ${#files[@]} )); then
98
+ cp -f "'' ${files[@]}" $out/${ packageCfgDir }
99
+ else
100
+ echo "$l/${ packageCfgDir } didn't contain any *.conf files!"
101
+ exit 1
102
+ fi
97
103
fi
98
104
done
99
105
for l in "${ libs } "; do
100
106
if [ -n "$l" ]; then
101
- cp -f "$l/package.conf.d/"*.conf $out/${ packageCfgDir }
107
+ files=("$l/package.conf.d/"*.conf)
108
+ if (( '' ${#files[@]} )); then
109
+ cp -f "'' ${files[@]}" $out/${ packageCfgDir }
110
+ else
111
+ echo "$l/package.conf.d didn't contain any *.conf files!"
112
+ exit 1
113
+ fi
102
114
fi
103
115
done
104
116
Original file line number Diff line number Diff line change 25
25
# Update supported-ghc-versions.md to reflect any changes made here.
26
26
{
27
27
ghc865 = true ;
28
+ ghc884 = false ; # Just included because the native version is needed at eval time
28
29
} // nixpkgs . lib . optionalAttrs ( nixpkgsName == "R2009" ) {
29
30
ghc883 = false ;
30
31
ghc884 = true ;
51
52
|| ( nixpkgsName == "R2003" && __elem compiler-nix-name [ "ghc865" ] ) ) ) {
52
53
# Windows cross compilation is currently broken on macOS
53
54
inherit ( lib . systems . examples ) mingwW64 ;
54
- } // lib . optionalAttrs ( system == "x86_64-linux" ) {
55
+ } // lib . optionalAttrs ( system == "x86_64-linux"
56
+ && ! ( nixpkgsName == "R2003" && compiler-nix-name == "ghc884" ) ) {
55
57
# Musl cross only works on linux
56
58
# aarch64 cross only works on linux
59
+ # We also skip these for the R2003 was build of ghc884 (we only need the
60
+ # native so ifdLevel 1 includes compiler needed in ifdLevel2 eval)
57
61
inherit ( lib . systems . examples ) musl64 aarch64-multiplatform ;
58
62
} ;
59
63
isDisabled = d :
Original file line number Diff line number Diff line change @@ -285,19 +285,19 @@ stdenv.mkDerivation (rec {
285
285
# Sanity checks for https://github.com/input-output-hk/haskell.nix/issues/660
286
286
if ! "$out/bin/${ targetPrefix } ghc" --version; then
287
287
echo "ERROR: Missing file $out/bin/${ targetPrefix } ghc"
288
- exit 0
288
+ exit 1
289
289
fi
290
290
if ! "$out/bin/${ targetPrefix } ghc-pkg" --version; then
291
291
echo "ERROR: Missing file $out/bin/${ targetPrefix } ghc-pkg"
292
- exit 0
292
+ exit 1
293
293
fi
294
294
if [[ ! -d "$out/lib/${ targetPrefix } ghc-${ version } " ]]; then
295
295
echo "ERROR: Missing directory $out/lib/${ targetPrefix } ghc-${ version } "
296
- exit 0
296
+ exit 1
297
297
fi
298
298
if (( $(ls -1 "$out/lib/${ targetPrefix } ghc-${ version } " | wc -l) < 30 )); then
299
299
echo "ERROR: Expected more files in $out/lib/${ targetPrefix } ghc-${ version } "
300
- exit 0
300
+ exit 1
301
301
fi
302
302
'' ;
303
303
Original file line number Diff line number Diff line change 31
31
pkgs . lib . optionalString ( index ? outputHash ) ''
32
32
if [[ "${ index . outputHash } " != "$index_sha256" ]]; then
33
33
echo "ERROR See https://github.com/input-output-hk/haskell.nix/issues/884"
34
- exit 0
34
+ exit 1
35
35
fi
36
36
'' }
37
37
export index_length=$(stat --printf="%s" ${ index } )
Original file line number Diff line number Diff line change 26
26
buildCommand = ''
27
27
if [[ "${ version-before } " != "0.6.0.0" ]]; then
28
28
echo 'Unexpected version ${ version-before } (expected "0.6.0.0")'
29
- exit 0
29
+ exit 1
30
30
fi
31
31
if [[ "${ version-after } " != "0.6.0.1" ]]; then
32
32
echo 'Unexpected version ${ version-after } (expected "0.6.0.1")'
33
- exit 0
33
+ exit 1
34
34
fi
35
35
36
36
touch $out
You can’t perform that action at this time.
0 commit comments