51 lines
1.8 KiB
Nix
51 lines
1.8 KiB
Nix
{ pkgs, kernel ? pkgs.linux, ... } :
|
|
with pkgs;
|
|
let
|
|
version = "7.4.0";
|
|
beegfs = pkgs.callPackage ./beegfs.nix { inherit kernel; };
|
|
in stdenvNoCC.mkDerivation {
|
|
name = "beegfs-module-${version}-${kernel.version}";
|
|
|
|
src = fetchurl {
|
|
name = "beegfs-archive-${version}.tar.bz2";
|
|
# url = "https://git.beegfs.com/pub/v7/repository/archive.tar.bz2?ref=${version}";
|
|
url = "https://git.beegfs.io/pub/v7/-/archive/${version}/v7-${version}.tar.bz2";
|
|
sha256 = "sha256-VwD3z3lZIs5aOIBbwUvEkOxkFggTCv8OWuJMCga2ooo=";
|
|
};
|
|
|
|
hardeningDisable = [ "fortify" "pic" "stackprotector" ];
|
|
|
|
nativeBuildInputs = [ gcc12 which kmod pahole ];
|
|
|
|
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:" \{} \;
|
|
find -type f -name "configure" -exec sed -i "s:/bin/:/usr/bin/env :" \{} \;
|
|
find -type f -name "configure" -exec sed -i "s:/usr/bin/:/usr/bin/env :" \{} \;
|
|
sed -i 's,libbeegfs_ib.so,${beegfs}/lib/&,' common/source/common/net/sock/RDMASocket.cpp
|
|
'';
|
|
|
|
preBuild = "cd client_module/build";
|
|
|
|
installPhase = ''
|
|
instdir=$out/lib/modules/${kernel.modDirVersion}/extras/fs/beegfs
|
|
mkdir -p $instdir
|
|
cp beegfs.ko $instdir
|
|
'';
|
|
|
|
meta = with 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; [ "juselius" ];
|
|
# broken = stdenv.lib.versionAtLeast kernel.version "4.18";
|
|
};
|
|
}
|