From fb1b6844a17ac5f6ccefdde7ff134a9a14ce5ff0 Mon Sep 17 00:00:00 2001 From: secufoe <135814375+secufoe@users.noreply.github.com> Date: Wed, 26 Feb 2025 12:34:50 +0100 Subject: [PATCH] ipxe: fix dangling symlink --- pkgs/by-name/ip/ipxe/package.nix | 35 +++++++++++++++++--------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/ip/ipxe/package.nix b/pkgs/by-name/ip/ipxe/package.nix index 046b9f34f30451..c51d9684902b54 100644 --- a/pkgs/by-name/ip/ipxe/package.nix +++ b/pkgs/by-name/ip/ipxe/package.nix @@ -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;