2017-12-29 01:51:42 +00:00
|
|
|
{ stdenv, fetchurl, which
|
|
|
|
, kmod, kernel
|
|
|
|
} :
|
|
|
|
|
|
|
|
let
|
2018-07-30 11:42:59 +01:00
|
|
|
version = "7.0";
|
2017-12-29 01:51:42 +00:00
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "beegfs-module-${version}-${kernel.version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-07-30 11:42:59 +01:00
|
|
|
url = "https://git.beegfs.com/pub/v7/repository/archive.tar.bz2?ref=${version}";
|
|
|
|
sha256 = "1wsljd5ybyhl94aqrdfvcs8a0l8w4pr0bs1vhjrf4y7ldhw35m3k";
|
2017-12-29 01:51:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "fortify" "pic" "stackprotector" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ which kmod ];
|
|
|
|
|
2017-12-31 07:07:16 +00:00
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2017-12-29 01:51:42 +00: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:" \{} \;
|
|
|
|
'';
|
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
preBuild = "cd client_module/build";
|
2017-12-29 01:51:42 +00:00
|
|
|
|
|
|
|
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 ];
|
2018-08-20 23:19:31 +01:00
|
|
|
broken = stdenv.lib.versionAtLeast kernel.version "4.18";
|
2017-12-29 01:51:42 +00:00
|
|
|
};
|
|
|
|
}
|