summary refs log tree commit diff
path: root/pkgs/os-specific/linux/zfs
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-04 11:00:50 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-04 11:06:44 +0200
commitcdeb2711017b776a80d9e8adfb39963722a915bc (patch)
tree5493a6c3e9113fc2f64d76f927f62716277f3586 /pkgs/os-specific/linux/zfs
parent7318ff0e385fde083d3bd2a0dcf0aedf88376124 (diff)
downloadnixpkgs-cdeb2711017b776a80d9e8adfb39963722a915bc.tar
nixpkgs-cdeb2711017b776a80d9e8adfb39963722a915bc.tar.gz
nixpkgs-cdeb2711017b776a80d9e8adfb39963722a915bc.tar.bz2
nixpkgs-cdeb2711017b776a80d9e8adfb39963722a915bc.tar.lz
nixpkgs-cdeb2711017b776a80d9e8adfb39963722a915bc.tar.xz
nixpkgs-cdeb2711017b776a80d9e8adfb39963722a915bc.tar.zst
nixpkgs-cdeb2711017b776a80d9e8adfb39963722a915bc.zip
zfs: Nuke references to linux.dev in *.ko files
This prevents linux.dev being included in the installation CD.
Diffstat (limited to 'pkgs/os-specific/linux/zfs')
-rw-r--r--pkgs/os-specific/linux/zfs/generic.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix
index 9a97bef22bb..b040201cf33 100644
--- a/pkgs/os-specific/linux/zfs/generic.nix
+++ b/pkgs/os-specific/linux/zfs/generic.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, autoconf, automake, libtool, utillinux
+{ stdenv, fetchFromGitHub, autoreconfHook, utillinux, nukeReferences
 , configFile ? "all"
 
 # Userspace dependencies
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
 
   inherit version src patches;
 
-  buildInputs = [ autoconf automake libtool ]
+  buildInputs = [ autoreconfHook nukeReferences ]
     ++ optionals buildKernel [ spl ]
     ++ optionals buildUser [ zlib libuuid python ];
 
@@ -68,8 +68,11 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  # Remove provided services as they are buggy
-  postInstall = optionalString buildUser ''
+  postInstall = ''
+    # Prevent kernel modules from depending on the Linux -dev output.
+    nuke-refs $(find $out -name "*.ko")
+  '' + optionalString buildUser ''
+    # Remove provided services as they are buggy
     rm $out/etc/systemd/system/zfs-import-*.service
 
     sed -i '/zfs-import-scan.service/d' $out/etc/systemd/system/*
@@ -78,7 +81,7 @@ stdenv.mkDerivation rec {
       substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target"
     done
 
-    # Fix pkgconfig
+    # Fix pkgconfig.
     ln -s ../share/pkgconfig $out/lib/pkgconfig
   '';