Skip to content

Commit 71232d9

Browse files
authored
ipxe: fix dangling symlink (#385240)
2 parents b6dd747 + fb1b684 commit 71232d9

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

pkgs/by-name/ip/ipxe/package.nix

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,25 @@ stdenv.mkDerivation (finalAttrs: {
112112

113113
buildFlags = lib.attrNames targets;
114114

115-
installPhase = ''
116-
runHook preInstall
117-
118-
mkdir -p $out
119-
${lib.concatStringsSep "\n" (
120-
lib.mapAttrsToList (
121-
from: to: if to == null then "cp -v ${from} $out" else "cp -v ${from} $out/${to}"
122-
) targets
123-
)}
124-
125-
# Some PXE constellations especially with dnsmasq are looking for the file with .0 ending
126-
# let's provide it as a symlink to be compatible in this case.
127-
ln -s undionly.kpxe $out/undionly.kpxe.0
128-
129-
runHook postInstall
130-
'';
115+
installPhase =
116+
''
117+
runHook preInstall
118+
119+
mkdir -p $out
120+
${lib.concatStringsSep "\n" (
121+
lib.mapAttrsToList (
122+
from: to: if to == null then "cp -v ${from} $out" else "cp -v ${from} $out/${to}"
123+
) targets
124+
)}
125+
''
126+
+ lib.optionalString stdenv.hostPlatform.isx86 ''
127+
# Some PXE constellations especially with dnsmasq are looking for the file with .0 ending
128+
# let's provide it as a symlink to be compatible in this case.
129+
ln -s undionly.kpxe $out/undionly.kpxe.0
130+
''
131+
+ ''
132+
runHook postInstall
133+
'';
131134

132135
enableParallelBuilding = true;
133136

0 commit comments

Comments
 (0)