summary refs log tree commit diff
path: root/pkgs/os-specific/linux/tp_smapi
diff options
context:
space:
mode:
authorDavid Guibert <david.guibert@gmail.com>2017-12-28 09:11:36 +0100
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-12-29 23:08:17 +0200
commit1e77d0b975ad714dc3c619bdddd949f94ec2fc79 (patch)
treeef094b85016c86fbe5c9fafd76d002a887f256dd /pkgs/os-specific/linux/tp_smapi
parent77cc63950a034de3b58bd718f30ebf122e5f137f (diff)
downloadnixpkgs-1e77d0b975ad714dc3c619bdddd949f94ec2fc79.tar
nixpkgs-1e77d0b975ad714dc3c619bdddd949f94ec2fc79.tar.gz
nixpkgs-1e77d0b975ad714dc3c619bdddd949f94ec2fc79.tar.bz2
nixpkgs-1e77d0b975ad714dc3c619bdddd949f94ec2fc79.tar.lz
nixpkgs-1e77d0b975ad714dc3c619bdddd949f94ec2fc79.tar.xz
nixpkgs-1e77d0b975ad714dc3c619bdddd949f94ec2fc79.tar.zst
nixpkgs-1e77d0b975ad714dc3c619bdddd949f94ec2fc79.zip
kernel 4.14 require libelf to compile modules.
[...]
make modules -C /nix/store/h1vzl6bq4wif3m8dd1bw2p3fv4shjg3n-linux-4.14.9-dev/lib/modules/4.14.9/build EXTRA_CFLAGS=-Werror-implicit-function-declaration M=/tmp/nix-build-spl-kernel-2017-11-16-4.14.9.drv-0/source/build
/nix/store/h1vzl6bq4wif3m8dd1bw2p3fv4shjg3n-linux-4.14.9-dev/lib/modules/4.14.9/source/Makefile:939: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.

This patch introduces kernel.moduleBuildDependencies to avoid the logic "stdenv.lib.optional (stdenv.lib.versionAtLeast kernel.version "4.14") libelf" in multiple places.

[dezgeg did some minor tweaks on top]
Diffstat (limited to 'pkgs/os-specific/linux/tp_smapi')
-rw-r--r--pkgs/os-specific/linux/tp_smapi/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/tp_smapi/default.nix b/pkgs/os-specific/linux/tp_smapi/default.nix
index 4fc14a04eea..c3adcc6cdba 100644
--- a/pkgs/os-specific/linux/tp_smapi/default.nix
+++ b/pkgs/os-specific/linux/tp_smapi/default.nix
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
     name = "tp-smapi-${version}";
   };
 
+  nativeBuildInputs = kernel.moduleBuildDependencies;
+
   hardeningDisable = [ "pic" ];
 
   makeFlags = [