NixOS configuration for HPC cluster
https://docs.hpc.informatik.hs-fulda.de/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
{ beegfs
|
|
, kmod
|
|
, kernel
|
|
, ... } :
|
|
|
|
kernel.stdenv.mkDerivation rec {
|
|
name = "beegfs-module-${beegfs.version}-${kernel.version}";
|
|
|
|
inherit (beegfs) src;
|
|
|
|
nativeBuildInputs = [
|
|
kmod
|
|
];
|
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
hardeningDisable = [ "fortify" "pic" "stackprotector" ];
|
|
|
|
sourceRoot = "v7-${beegfs.version}/client_module/build";
|
|
|
|
makeFlags = [
|
|
"KERNELRELEASE=${kernel.modDirVersion}"
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build/"
|
|
"BEEGFS_VERSION=${beegfs.version}-nixos1"
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs ./
|
|
|
|
find -type f -name Makefile -exec sed -i "s:/bin/true:true:" \{} \;
|
|
find -type f -name "*.mk" -exec sed -i "s:/bin/true:true:" \{} \;
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib/modules/${kernel.modDirVersion}/extras/fs/beegfs
|
|
install -t $out/lib/modules/${kernel.modDirVersion}/extras/fs/beegfs beegfs.ko
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with kernel.stdenv.lib; {
|
|
description = beegfs.meta.description + " (kernel module)";
|
|
inherit (beegfs.meta) homepage license platforms;
|
|
};
|
|
}
|