From 0a44f5469566e1fcfb3334f3726ae1310f617f83 Mon Sep 17 00:00:00 2001 From: Daniel Fullmer Date: Tue, 19 Jul 2022 13:28:45 -0700 Subject: [PATCH] ipxe: fix cross-compilation Tested x86_64 -> arm64 cross compilation, and testing booting via ipxe on an arm64 device. --- pkgs/tools/misc/ipxe/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/ipxe/default.nix b/pkgs/tools/misc/ipxe/default.nix index dacc3416c93e..03efc1b664c5 100644 --- a/pkgs/tools/misc/ipxe/default.nix +++ b/pkgs/tools/misc/ipxe/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, unstableGitUpdater +{ stdenv, lib, fetchFromGitHub, unstableGitUpdater, buildPackages , gnu-efi, mtools, openssl, perl, xorriso, xz , syslinux ? null , embedScript ? null @@ -32,6 +32,9 @@ stdenv.mkDerivation rec { version = "unstable-2022-04-06"; nativeBuildInputs = [ gnu-efi mtools openssl perl xorriso xz ] ++ lib.optional stdenv.hostPlatform.isx86 syslinux; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + + strictDeps = true; src = fetchFromGitHub { owner = "ipxe"; @@ -51,6 +54,7 @@ stdenv.mkDerivation rec { makeFlags = [ "ECHO_E_BIN_ECHO=echo" "ECHO_E_BIN_ECHO_E=echo" # No /bin/echo here. + "CROSS=${stdenv.cc.targetPrefix}" ] ++ lib.optional (embedScript != null) "EMBED=${embedScript}";