2017-12-29 02:51:42 +01:00
|
|
|
{ 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 ];
|
|
|
|
|
2017-12-31 08:07:16 +01:00
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2017-12-29 02:51:42 +01:00
|
|
|
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 ];
|
2017-12-31 08:07:16 +01:00
|
|
|
broken = versionAtLeast kernel.version "4.14";
|
2017-12-29 02:51:42 +01:00
|
|
|
};
|
|
|
|
}
|