@@ -17,7 +17,7 @@
17, preCheck ? null, postCheck ? null
17, preCheck ? null, postCheck ? null
18, preInstall ? null, postInstall ? null
18, preInstall ? null, postInstall ? null
20−, doCheck ? component.doCheck || componentId.ctype == "test"
20+, doCheck ? component.doCheck || haskellLib.isTest componentId
21, doCrossCheck ? component.doCrossCheck || false
21, doCrossCheck ? component.doCrossCheck || false
22, dontPatchELF ? true
22, dontPatchELF ? true
23, dontStrip ? true
23, dontStrip ? true
@@ -27,7 +27,9 @@
30+ fullName = if haskellLib.isAll componentId
30− fullName = "${name}-${componentId.ctype}-${componentId.cname}";
32+ else "${name}-${componentId.ctype}-${componentId.cname}";
32 flagsAndConfig = field: xs: lib.optionalString (xs != []) ''
34 flagsAndConfig = field: xs: lib.optionalString (xs != []) ''
33 echo ${lib.concatStringsSep " " (map (x: "--${field}=${x}") xs)} >> $out/configure-flags
35 echo ${lib.concatStringsSep " " (map (x: "--${field}=${x}") xs)} >> $out/configure-flags
@@ -122,7 +124,7 @@ let
123 finalConfigureFlags = lib.concatStringsSep " " (
125 finalConfigureFlags = lib.concatStringsSep " " (
124 [ "--prefix=$out"
126 [ "--prefix=$out"
125− "${componentId.ctype}:${componentId.cname}"
127+ "${haskellLib.componentTarget componentId}"
126 "$(cat ${configFiles}/configure-flags)"
128 "$(cat ${configFiles}/configure-flags)"
128 "--with-ghc=${ghc.targetPrefix}ghc"
130 "--with-ghc=${ghc.targetPrefix}ghc"
@@ -217,12 +219,12 @@ in stdenv.mkDerivation ({
217 installPhase = ''
219 installPhase = ''
218 runHook preInstall
220 runHook preInstall
219 $SETUP_HS copy ${lib.concatStringsSep " " component.setupInstallFlags}
221 $SETUP_HS copy ${lib.concatStringsSep " " component.setupInstallFlags}
220− ${lib.optionalString (haskellLib.isLibrary componentId) ''
222+ ${lib.optionalString (haskellLib.isLibrary componentId || haskellLib.isAll componentId) ''
221 $SETUP_HS register --gen-pkg-config=${name}.conf
223 $SETUP_HS register --gen-pkg-config=${name}.conf
222 ${ghc.targetPrefix}ghc-pkg -v0 init $out/package.conf.d
224 ${ghc.targetPrefix}ghc-pkg -v0 init $out/package.conf.d
223 ${ghc.targetPrefix}ghc-pkg -v0 --package-db ${configFiles}/package.conf.d -f $out/package.conf.d register ${name}.conf
225 ${ghc.targetPrefix}ghc-pkg -v0 --package-db ${configFiles}/package.conf.d -f $out/package.conf.d register ${name}.conf
225− ${lib.optionalString (componentId.ctype == "test") ''
227+ ${lib.optionalString (haskellLib.isTest componentId || haskellLib.isAll componentId) ''
226 mkdir -p $out/${name}
228 mkdir -p $out/${name}
227 if [ -f "dist/build/${componentId.cname}/${componentId.cname}" ]; then
229 if [ -f "dist/build/${componentId.cname}/${componentId.cname}" ]; then
228 cp dist/build/${componentId.cname}/${componentId.cname} $out/${name}/
230 cp dist/build/${componentId.cname}/${componentId.cname} $out/${name}/