gnu-efi: Only build on efi-enabled systems

This commit is contained in:
Shea Levy 2018-02-24 21:49:31 -05:00
parent 09e57636f8
commit 87270fb306
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27
3 changed files with 9 additions and 5 deletions

View file

@ -38,6 +38,7 @@ rec {
Kexecable = map (family: { kernel = kernels.linux; cpu.family = family; })
[ "x86" "arm" "aarch64" "mips" ];
Efi = map (family: { cpu.family = family; }) [ "x86" "arm" ];
};
matchAnyAttrs = patterns:

View file

@ -8,6 +8,7 @@
, ninja, meson, python3Packages, glibcLocales
, patchelf
, getent
, hostPlatform
}:
assert stdenv.isLinux;
@ -71,10 +72,10 @@ in
"-Dsystem-gid-max=499"
# "-Dtime-epoch=1"
(if stdenv.isArm then "-Dgnu-efi=false" else "-Dgnu-efi=true")
"-Defi-libdir=${gnu-efi}/lib"
"-Defi-includedir=${gnu-efi}/include/efi"
"-Defi-ldsdir=${gnu-efi}/lib"
(if stdenv.isArm || !hostPlatform.isEfi then "-Dgnu-efi=false" else "-Dgnu-efi=true")
"-Defi-libdir=${toString gnu-efi}/lib"
"-Defi-includedir=${toString gnu-efi}/include/efi"
"-Defi-ldsdir=${toString gnu-efi}/lib"
"-Dsysvinit-path="
"-Dsysvrcnd-path="

View file

@ -8995,7 +8995,9 @@ with pkgs;
gnu-config = callPackage ../development/libraries/gnu-config { };
gnu-efi = callPackage ../development/libraries/gnu-efi { };
gnu-efi = if hostPlatform.isEfi
then callPackage ../development/libraries/gnu-efi { }
else null;
gnutls = callPackage
(if stdenv.isDarwin