Merge pull request #182133 from danielfullmer/fix-ipxe-cross

ipxe: fix cross-compilation
This commit is contained in:
Artturi 2022-07-24 05:51:07 +03:00 committed by GitHub
commit 56ab51864e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}";