diff options
author | William A. Kennington III <william@wkennington.com> | 2015-04-27 15:58:34 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-04-27 16:00:17 -0700 |
commit | 47e67a80b9cb04507e5f8bc65efb3797c24aae04 (patch) | |
tree | b2984c58d82317e7e0349d4740447a06dc2fa392 /pkgs/os-specific/linux/fusionio | |
parent | e64cd5feecd4f7bbfb895dfafb6496d506334f36 (diff) | |
download | nixlib-47e67a80b9cb04507e5f8bc65efb3797c24aae04.tar nixlib-47e67a80b9cb04507e5f8bc65efb3797c24aae04.tar.gz nixlib-47e67a80b9cb04507e5f8bc65efb3797c24aae04.tar.bz2 nixlib-47e67a80b9cb04507e5f8bc65efb3797c24aae04.tar.lz nixlib-47e67a80b9cb04507e5f8bc65efb3797c24aae04.tar.xz nixlib-47e67a80b9cb04507e5f8bc65efb3797c24aae04.tar.zst nixlib-47e67a80b9cb04507e5f8bc65efb3797c24aae04.zip |
fusionio: Add iomemory-vsl driver
Diffstat (limited to 'pkgs/os-specific/linux/fusionio')
-rw-r--r-- | pkgs/os-specific/linux/fusionio/vsl-fix-file-inode.patch | 13 | ||||
-rw-r--r-- | pkgs/os-specific/linux/fusionio/vsl.nix | 38 |
2 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/fusionio/vsl-fix-file-inode.patch b/pkgs/os-specific/linux/fusionio/vsl-fix-file-inode.patch new file mode 100644 index 000000000000..25887ceee0f6 --- /dev/null +++ b/pkgs/os-specific/linux/fusionio/vsl-fix-file-inode.patch @@ -0,0 +1,13 @@ +diff --git a/kfile.c b/kfile.c +index 5014e77..a65d921 100644 +--- a/kfile.c ++++ b/kfile.c +@@ -51,7 +51,7 @@ fusion_inode * noinline kfio_fs_inode(fusion_file *fp) + #if KFIOC_STRUCT_FILE_HAS_PATH + return (fusion_inode *) ((struct file *)fp)->f_path.dentry->d_inode; + #else +- return (fusion_inode *) ((struct file *)fp)->f_dentry->d_inode; ++ return (fusion_inode *) file_inode((struct file *)fp); + #endif + } + diff --git a/pkgs/os-specific/linux/fusionio/vsl.nix b/pkgs/os-specific/linux/fusionio/vsl.nix new file mode 100644 index 000000000000..7947446c1f2b --- /dev/null +++ b/pkgs/os-specific/linux/fusionio/vsl.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, kernel }: + +stdenv.mkDerivation rec { + name = "fusionio-iomemory-vsl-3.2.10"; + + src = fetchurl { + name = "${name}.tar.gz"; + url = "https://drive.google.com/uc?export=download&id=0B7U0_ZBLoB2WbXFMbExEMUFCcWM"; + sha256 = "1zm20aa1jmmqcqkb4p9r4jsgbg371zr1abdz32rw02i9687fsgcc"; + }; + + prePatch = '' + cd root/usr/src/iomemory-vsl-* + ''; + + patches = stdenv.lib.optional (stdenv.lib.versionAtLeast kernel.version "3.19") ./vsl-fix-file-inode.patch; + + preBuild = '' + sed -i Makefile kfio_config.sh \ + -e "s,\(KERNELDIR=\"\|KERNEL_SRC =\)[^\"]*,\1${kernel.dev}/lib/modules/${kernel.modDirVersion}/build,g" + export DKMS_KERNEL_VERSION=${kernel.modDirVersion} + export TARGET="x86_64_cc48" + ''; + + installPhase = '' + export INSTALL_ROOT=$out + make modules_install + ''; + + meta = with stdenv.lib; { + homepage = http://fusionio.com; + description = "kernel driver for accessing fusion-io cards"; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + broken = stdenv.system != "x86_64-linux"; + maintainers = with maintainers; [ wkennington ]; + }; +} |