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.

44 lines
1.1 KiB

2 years ago
  1. { beegfs
  2. , kmod
  3. , kernel
  4. , ... } :
  5. kernel.stdenv.mkDerivation rec {
  6. name = "beegfs-module-${beegfs.version}-${kernel.version}";
  7. inherit (beegfs) src;
  8. nativeBuildInputs = [
  9. kmod
  10. ];
  11. buildInputs = kernel.moduleBuildDependencies;
  12. hardeningDisable = [ "fortify" "pic" "stackprotector" ];
  13. sourceRoot = "v7-${beegfs.version}/client_module/build";
  14. makeFlags = [
  15. "KERNELRELEASE=${kernel.modDirVersion}"
  16. "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build/"
  17. "BEEGFS_VERSION=${beegfs.version}-nixos1"
  18. ];
  19. postPatch = ''
  20. patchShebangs ./
  21. find -type f -name Makefile -exec sed -i "s:/bin/true:true:" \{} \;
  22. find -type f -name "*.mk" -exec sed -i "s:/bin/true:true:" \{} \;
  23. '';
  24. installPhase = ''
  25. mkdir -p $out/lib/modules/${kernel.modDirVersion}/extras/fs/beegfs
  26. install -t $out/lib/modules/${kernel.modDirVersion}/extras/fs/beegfs beegfs.ko
  27. '';
  28. enableParallelBuilding = true;
  29. meta = with kernel.stdenv.lib; {
  30. description = beegfs.meta.description + " (kernel module)";
  31. inherit (beegfs.meta) homepage license platforms;
  32. };
  33. }