summary refs log tree commit diff
path: root/pkgs/os-specific/linux/beegfs/kernel-module.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2017-12-31 09:51:58 +0100
committerVladimír Čunát <vcunat@gmail.com>2017-12-31 09:53:49 +0100
commit1fcd92ce923d33ab3d8c0b6c6d42473b135f114b (patch)
treec0f696c1c2d3ff82067d891ee25bb4f44af54880 /pkgs/os-specific/linux/beegfs/kernel-module.nix
parent4d2b7638173afb4c0f0c12a43654bcff5c9500ab (diff)
parentab3a12ed7ee0de4d247a8017151a1bf01829f6f7 (diff)
downloadnixlib-1fcd92ce923d33ab3d8c0b6c6d42473b135f114b.tar
nixlib-1fcd92ce923d33ab3d8c0b6c6d42473b135f114b.tar.gz
nixlib-1fcd92ce923d33ab3d8c0b6c6d42473b135f114b.tar.bz2
nixlib-1fcd92ce923d33ab3d8c0b6c6d42473b135f114b.tar.lz
nixlib-1fcd92ce923d33ab3d8c0b6c6d42473b135f114b.tar.xz
nixlib-1fcd92ce923d33ab3d8c0b6c6d42473b135f114b.tar.zst
nixlib-1fcd92ce923d33ab3d8c0b6c6d42473b135f114b.zip
Merge branch 'master' into staging
A few thousand rebuilds from master, again.
Hydra: ?compare=1422362
Diffstat (limited to 'pkgs/os-specific/linux/beegfs/kernel-module.nix')
-rw-r--r--pkgs/os-specific/linux/beegfs/kernel-module.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/beegfs/kernel-module.nix b/pkgs/os-specific/linux/beegfs/kernel-module.nix
new file mode 100644
index 000000000000..4525d156159b
--- /dev/null
+++ b/pkgs/os-specific/linux/beegfs/kernel-module.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, which
+, kmod, kernel
+} :
+
+let
+  version = "6.17";
+in stdenv.mkDerivation {
+  name = "beegfs-module-${version}-${kernel.version}";
+
+  src = fetchurl {
+    url = "https://git.beegfs.com/pub/v6/repository/archive.tar.bz2?ref=${version}";
+    sha256 = "10xs7gzdmlg23k6zn1b7jij3lljn7rr1j6h476hq4lbg981qk3n3";
+  };
+
+  hardeningDisable = [ "fortify" "pic" "stackprotector" ];
+
+  nativeBuildInputs = [ which kmod ];
+
+  buildInputs = kernel.moduleBuildDependencies;
+
+  makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build/" ];
+
+  postPatch = ''
+    patchShebangs ./
+    find -type f -name Makefile -exec sed -i "s:/bin/bash:${stdenv.shell}:" \{} \;
+    find -type f -name Makefile -exec sed -i "s:/bin/true:true:" \{} \;
+    find -type f -name "*.mk" -exec sed -i "s:/bin/true:true:" \{} \;
+  '';
+
+  preBuild = "cd beegfs_client_module/build";
+
+  installPhase = ''
+    instdir=$out/lib/modules/${kernel.modDirVersion}/extras/fs/beegfs
+    mkdir -p $instdir
+    cp beegfs.ko $instdir
+  '';
+
+  meta = with stdenv.lib; {
+    description = "High performance distributed filesystem with RDMA support";
+    homepage = "https://www.beegfs.io";
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ markuskowa ];
+    broken = versionAtLeast kernel.version "4.14";
+  };
+}