File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 104
104
&& ( haskellLib . isLibrary componentId )
105
105
&& stdenv . hostPlatform == stdenv . buildPlatform ;
106
106
107
- testExecutable = "dist/build/ ${ componentId . cname } / ${ componentId . cname } "
108
- + lib . optionalString stdenv . hostPlatform . isWindows ".exe ";
107
+ exeExt = lib . optionalString stdenv . hostPlatform . isWindows ".exe" ;
108
+ testExecutable = "dist/build/ ${ componentId . cname } / ${ componentId . cname } ${ exeExt } ";
109
109
110
110
in stdenv . lib . fix ( drv :
111
111
@@ -233,13 +233,10 @@ stdenv.mkDerivation ({
233
233
${ ghc . targetPrefix } ghc-pkg -v0 --package-db ${ configFiles } /package.conf.d -f $out/package.conf.d register ${ name } .conf
234
234
fi
235
235
'' }
236
- ${ lib . optionalString ( haskellLib . isTest componentId || haskellLib . isAll componentId ) ''
236
+ ${ lib . optionalString ( haskellLib . isTest componentId || haskellLib . isBenchmark componentId || haskellLib . isAll componentId ) ''
237
237
mkdir -p $out/${ name }
238
- if [ -f "dist/build/${ componentId . cname } /${ componentId . cname } " ]; then
239
- cp dist/build/${ componentId . cname } /${ componentId . cname } $out/${ name } /
240
- fi
241
- if [ -f "dist/build/${ componentId . cname } /${ componentId . cname } .exe" ]; then
242
- cp dist/build/${ componentId . cname } /${ componentId . cname } .exe $out/${ name } /
238
+ if [ -f ${ testExecutable } ]; then
239
+ cp ${ testExecutable } $out/${ name } /
243
240
fi
244
241
'' }
245
242
runHook postInstall
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ with haskellLib;
55
55
isLibrary = componentId : componentId . ctype == "lib" ;
56
56
isAll = componentId : componentId . ctype == "all" ;
57
57
isTest = componentId : componentId . ctype == "test" ;
58
+ isBenchmark = componentId : componentId . ctype == "bench" ;
58
59
59
60
# Format a componentId as it should appear as a target on the
60
61
# command line of the setup script.
You can’t perform that action at this time.
0 commit comments