at 18.09-beta 46 lines 1.4 kB view raw
1{ stdenv, fetchurl, which 2, kmod, kernel 3} : 4 5let 6 version = "7.0"; 7in stdenv.mkDerivation { 8 name = "beegfs-module-${version}-${kernel.version}"; 9 10 src = fetchurl { 11 url = "https://git.beegfs.com/pub/v7/repository/archive.tar.bz2?ref=${version}"; 12 sha256 = "1wsljd5ybyhl94aqrdfvcs8a0l8w4pr0bs1vhjrf4y7ldhw35m3k"; 13 }; 14 15 hardeningDisable = [ "fortify" "pic" "stackprotector" ]; 16 17 nativeBuildInputs = [ which kmod ]; 18 19 buildInputs = kernel.moduleBuildDependencies; 20 21 makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build/" ]; 22 23 postPatch = '' 24 patchShebangs ./ 25 find -type f -name Makefile -exec sed -i "s:/bin/bash:${stdenv.shell}:" \{} \; 26 find -type f -name Makefile -exec sed -i "s:/bin/true:true:" \{} \; 27 find -type f -name "*.mk" -exec sed -i "s:/bin/true:true:" \{} \; 28 ''; 29 30 preBuild = "cd client_module/build"; 31 32 installPhase = '' 33 instdir=$out/lib/modules/${kernel.modDirVersion}/extras/fs/beegfs 34 mkdir -p $instdir 35 cp beegfs.ko $instdir 36 ''; 37 38 meta = with stdenv.lib; { 39 description = "High performance distributed filesystem with RDMA support"; 40 homepage = "https://www.beegfs.io"; 41 platforms = [ "i686-linux" "x86_64-linux" ]; 42 license = licenses.gpl2; 43 maintainers = with maintainers; [ markuskowa ]; 44 broken = stdenv.lib.versionAtLeast kernel.version "4.18"; 45 }; 46}