linux: fix cross-build dependencies

This is untested but according to
https://github.com/NixOS/nixpkgs/pull/127922#issuecomment-927346171

zlib is only used in the host build, which breaks cross-compilation if
not present.
This commit is contained in:
Jörg Thalheim 2021-09-28 10:13:01 +02:00 committed by Alyssa Ross
parent 6a463f6dac
commit c21ba4f7bb

View file

@ -318,10 +318,9 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat
++ optionals (lib.versionAtLeast version "4.16") [ bison flex ]
++ optionals (lib.versionAtLeast version "5.2") [ cpio pahole ]
++ optional (lib.versionAtLeast version "5.8") elfutils
++ optional (lib.versionAtLeast version "5.2") zlib
;
buildInputs = optional (lib.versionAtLeast version "5.2") zlib;
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" "pie" ];
# Absolute paths for compilers avoid any PATH-clobbering issues.