Skip to content

Commit 8167144

Browse files
committed
Fix musl copy
1 parent 4819428 commit 8167144

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

compiler/ghc/default.nix

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -799,19 +799,17 @@ stdenv.mkDerivation (rec {
799799
then ''
800800
mkdir $out
801801
cp -r _build/stage1/bin $out
802-
${
803-
# These are needed when building the reinstallable lib ghc
804-
if targetPlatform.isMusl
805-
then ''
806-
cp _build/stageBoot/bin/genprimopcode $out/bin
807-
cp _build/stageBoot/bin/deriveConstants $out/bin
808-
'' else ''
809-
cp _build/stageBoot/bin/${targetPrefix}genprimopcode $out/bin
810-
ln -s $out/bin/${targetPrefix}genprimopcode $out/bin/genprimopcode
811-
cp _build/stageBoot/bin/${targetPrefix}deriveConstants $out/bin
812-
ln -s $out/bin/${targetPrefix}deriveConstants $out/bin/deriveConstants
813-
''
814-
}
802+
# let's assume that if we find a non-prefixed genprimop,
803+
# we also find a non-prefixed deriveConstants
804+
if [ -f _build/stage1/bin/genprimopcode ]; then
805+
cp _build/stageBoot/bin/genprimopcode $out/bin
806+
cp _build/stageBoot/bin/deriveConstants $out/bin
807+
else
808+
cp _build/stageBoot/bin/${targetPrefix}genprimopcode $out/bin
809+
ln -s $out/bin/${targetPrefix}genprimopcode $out/bin/genprimopcode
810+
cp _build/stageBoot/bin/${targetPrefix}deriveConstants $out/bin
811+
ln -s $out/bin/${targetPrefix}deriveConstants $out/bin/deriveConstants
812+
fi
815813
cp -r _build/stage1/lib $out
816814
mkdir $doc
817815
cp -r _build/stage1/share $doc

0 commit comments

Comments
 (0)