Skip to content

Commit

Permalink
ipxe: fix dangling symlink (#385240)
Browse files Browse the repository at this point in the history
  • Loading branch information
jopejoe1 authored Mar 10, 2025
2 parents b6dd747 + fb1b684 commit 71232d9
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions pkgs/by-name/ip/ipxe/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,25 @@ stdenv.mkDerivation (finalAttrs: {

buildFlags = lib.attrNames targets;

installPhase = ''
runHook preInstall
mkdir -p $out
${lib.concatStringsSep "\n" (
lib.mapAttrsToList (
from: to: if to == null then "cp -v ${from} $out" else "cp -v ${from} $out/${to}"
) targets
)}
# Some PXE constellations especially with dnsmasq are looking for the file with .0 ending
# let's provide it as a symlink to be compatible in this case.
ln -s undionly.kpxe $out/undionly.kpxe.0
runHook postInstall
'';
installPhase =
''
runHook preInstall
mkdir -p $out
${lib.concatStringsSep "\n" (
lib.mapAttrsToList (
from: to: if to == null then "cp -v ${from} $out" else "cp -v ${from} $out/${to}"
) targets
)}
''
+ lib.optionalString stdenv.hostPlatform.isx86 ''
# Some PXE constellations especially with dnsmasq are looking for the file with .0 ending
# let's provide it as a symlink to be compatible in this case.
ln -s undionly.kpxe $out/undionly.kpxe.0
''
+ ''
runHook postInstall
'';

enableParallelBuilding = true;

Expand Down

0 comments on commit 71232d9

Please sign in to comment.