git.iko.soy/typeable/nixpkgs
on master help sign in
kernel: Add deps for building 4.16
commit64fa0d5b974b13b222083ebc3103cf4a34687bd6 authorTuomas Tynkkynen <tuomas@tuxera.com> dateThu 15 Feb 2018, 18:27 (9 years ago) parent7a7e8a8
2 files changed+7−5
pkgs/os-specific/linux/kernel/generic.nix+3−2 pkgs/os-specific/linux/kernel/manual-config.nix+4−3
pkgs/os-specific/linux/kernel/generic.nix+3−2
@@ -1,4 +1,4 @@
1−{ buildPackages, runCommand, nettools, bc, perl, gmp, libmpc, mpfr, openssl
1+{ buildPackages, runCommand, nettools, bc, bison, flex, perl, gmp, libmpc, mpfr, openssl
22, ncurses
33, libelf
44, utillinux
@@ -82,7 +82,8 @@ let
8282 kernelConfig = kernelConfigFun config;
8383
8484 depsBuildBuild = [ buildPackages.stdenv.cc ];
85− nativeBuildInputs = [ perl ];
85+ nativeBuildInputs = [ perl ]
86+ ++ lib.optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ];
8687
8788 platformName = hostPlatform.platform.name;
8889 # e.g. "defconfig"
pkgs/os-specific/linux/kernel/manual-config.nix+4−3
@@ -1,4 +1,4 @@
1−{ buildPackages, runCommand, nettools, bc, perl, gmp, libmpc, mpfr, openssl
1+{ buildPackages, runCommand, nettools, bc, bison, flex, perl, gmp, libmpc, mpfr, openssl
22, ncurses ? null
33, libelf
44, utillinux
@@ -41,10 +41,10 @@ in {
4141
4242let
4343 inherit (stdenv.lib)
44− hasAttr getAttr optional optionalString optionalAttrs maintainers platforms;
44+ hasAttr getAttr optional optionals optionalString optionalAttrs maintainers platforms;
4545
4646 # Dependencies that are required to build kernel modules
47− moduleBuildDependencies = stdenv.lib.optional (stdenv.lib.versionAtLeast version "4.14") libelf;
47+ moduleBuildDependencies = optional (stdenv.lib.versionAtLeast version "4.14") libelf;
4848
4949 installkernel = writeTextFile { name = "installkernel"; executable=true; text = ''
5050 #!${stdenv.shell} -e
@@ -262,6 +262,7 @@ stdenv.mkDerivation ((drvAttrs config hostPlatform.platform kernelPatches config
262262 ++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools
263263 ++ optional (stdenv.lib.versionAtLeast version "4.14") libelf
264264 ++ optional (stdenv.lib.versionAtLeast version "4.15") utillinux
265+ ++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
265266 ;
266267
267268 hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" ];