summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/spl/default.nix2
-rw-r--r--pkgs/os-specific/linux/zfs/default.nix2
-rw-r--r--pkgs/os-specific/linux/zfs/module_perm_prefix.patch70
-rw-r--r--pkgs/os-specific/linux/zfs/nix-build.patch (renamed from pkgs/os-specific/linux/zfs/kerneldir_path.patch)0
-rw-r--r--pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch25
5 files changed, 1 insertions, 98 deletions
diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix
index c01a4d33502d..75ff28939722 100644
--- a/pkgs/os-specific/linux/spl/default.nix
+++ b/pkgs/os-specific/linux/spl/default.nix
@@ -11,8 +11,6 @@ stdenv.mkDerivation {
 
   buildInputs = [ perl kernelDev autoconf automake libtool ];
 
-  NIX_CFLAGS_COMPILE = "-I${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build/include/generated";
-
   preConfigure = ''
     ./autogen.sh
 
diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix
index b330ddab8fcf..ac07474d3f4b 100644
--- a/pkgs/os-specific/linux/zfs/default.nix
+++ b/pkgs/os-specific/linux/zfs/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
     sha256 = "1ykph9d4p70mam6lvcx0zld6d34gch15dsilds5ncbxh0m52knl0";
   };
 
-  patches = [ ./mount_zfs_prefix.patch ./kerneldir_path.patch ];
+  patches = [ ./mount_zfs_prefix.patch ./nix-build.patch ];
 
   buildInputs = [ kernelDev spl perl autoconf automake libtool zlib libuuid coreutils ];
 
diff --git a/pkgs/os-specific/linux/zfs/module_perm_prefix.patch b/pkgs/os-specific/linux/zfs/module_perm_prefix.patch
deleted file mode 100644
index 07cd04d1dded..000000000000
--- a/pkgs/os-specific/linux/zfs/module_perm_prefix.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-*** git-export/module/Makefile.in.orig	Wed Dec 31 16:00:01 1969
---- git-export/module/Makefile.in	Tue Mar  6 00:23:07 2012
-***************
-*** 11,19 ****
-  	@# installed devel headers, or they may be in the module
-  	@# subdirectory when building against the spl source tree.
-  	@if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
-! 		/bin/cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
-  	elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
-! 		/bin/cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
-  	else \
-  		echo -e "\n" \
-  		"*** Missing spl symbols ensure you have built the spl:\n" \
---- 11,21 ----
-  	@# installed devel headers, or they may be in the module
-  	@# subdirectory when building against the spl source tree.
-  	@if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
-! 		/bin/cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \
-! 		chmod +w @SPL_SYMBOLS@ .; \
-  	elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
-! 		/bin/cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
-! 		chmod +w @SPL_SYMBOLS@ .; \
-  	else \
-  		echo -e "\n" \
-  		"*** Missing spl symbols ensure you have built the spl:\n" \
-***************
-*** 35,55 ****
-  modules_install:
-  	@# Install the kernel modules
-  	$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
-! 		INSTALL_MOD_PATH=$(DESTDIR) \
-  		INSTALL_MOD_DIR=addon/zfs $@
-  	@# Remove extraneous build products when packaging
-! 	if [ -n "$(DESTDIR)" ]; then \
-! 		find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \
-  			-name 'modules.*' | xargs $(RM); \
-  	fi
-! 	sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \
-  	if [ -f $$sysmap ]; then \
-  		depmod -ae -F $$sysmap @LINUX_VERSION@; \
-  	fi
-  
-  modules_uninstall:
-  	@# Uninstall the kernel modules
-! 	$(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/zfs
-  
-  distdir:
-  
---- 37,57 ----
-  modules_install:
-  	@# Install the kernel modules
-  	$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
-! 		INSTALL_MOD_PATH=@prefix@ \
-  		INSTALL_MOD_DIR=addon/zfs $@
-  	@# Remove extraneous build products when packaging
-! 	if [ -n "@prefix@" ]; then \
-! 		find @prefix@/lib/modules/@LINUX_VERSION@ \
-  			-name 'modules.*' | xargs $(RM); \
-  	fi
-! 	sysmap=@prefix@/boot/System.map-@LINUX_VERSION@; \
-  	if [ -f $$sysmap ]; then \
-  		depmod -ae -F $$sysmap @LINUX_VERSION@; \
-  	fi
-  
-  modules_uninstall:
-  	@# Uninstall the kernel modules
-! 	$(RM) -R @prefix@/lib/modules/@LINUX_VERSION@/addon/zfs
-  
-  distdir:
-  
diff --git a/pkgs/os-specific/linux/zfs/kerneldir_path.patch b/pkgs/os-specific/linux/zfs/nix-build.patch
index af4b94e355d7..af4b94e355d7 100644
--- a/pkgs/os-specific/linux/zfs/kerneldir_path.patch
+++ b/pkgs/os-specific/linux/zfs/nix-build.patch
diff --git a/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch b/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch
deleted file mode 100644
index e223e34c3a43..000000000000
--- a/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-*** git-export/module/Makefile.in.old	Tue Mar  6 01:04:48 2012
---- git-export/module/Makefile.in	Tue Mar  6 01:04:59 2012
-***************
-*** 11,20 ****
-  	@# installed devel headers, or they may be in the module
-  	@# subdirectory when building against the spl source tree.
-  	@if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
-! 		/bin/cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \
-  		chmod +w @SPL_SYMBOLS@ .; \
-  	elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
-! 		/bin/cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
-  		chmod +w @SPL_SYMBOLS@ .; \
-  	else \
-  		echo -e "\n" \
---- 11,20 ----
-  	@# installed devel headers, or they may be in the module
-  	@# subdirectory when building against the spl source tree.
-  	@if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
-! 		cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \
-  		chmod +w @SPL_SYMBOLS@ .; \
-  	elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
-! 		cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
-  		chmod +w @SPL_SYMBOLS@ .; \
-  	else \
-  		echo -e "\n" \