fix: add k8s and hpc modules to main repo

This commit is contained in:
Jonas Juselius
2025-06-30 12:21:05 +02:00
parent 4aa9fa677a
commit bc3a034654
46 changed files with 4393 additions and 0 deletions

46
modules/hpc/knem.nix Normal file
View File

@@ -0,0 +1,46 @@
{ pkgs, kernel ? pkgs.linux, ... } :
with pkgs;
let
version = "master";
kdir="${kernel.dev}/lib/modules/${kernel.modDirVersion}";
in stdenv.mkDerivation {
inherit version;
name = "knem-${version}-${kernel.version}";
# src = fetchurl {
# name = "knem-${version}.tar.bz2";
# url = "https://gitlab.inria.fr/knem/knem/uploads/4a43e3eb860cda2bbd5bf5c7c04a24b6/knem-1.1.4.tar.gz";
# sha256 = "0dq9a41s08alrgggabmlyagmwl95sczmhi36gph5axmfg42kc3lz";
# };
src = fetchgit {
name = "knem-${version}";
url = "https://gitlab.inria.fr/knem/knem.git";
sha256 = "sha256-ptjALI2q2AF0tvdxXm4xH+8rXO8qnRwPfWMPITjrKVI=";
};
hardeningDisable = [ "fortify" "pic" "stackprotector" ];
nativeBuildInputs = [ which kmod pkgconf ];
buildInputs = kernel.moduleBuildDependencies ++ [
libtool autoconf pkgconf automake hwloc
] ;
preConfigurePhases = "preConfigure";
preConfigure = ''
autoupdate
./autogen.sh
'';
configureFlags = [
"--with-linux-release=${kernel.modDirVersion}"
"--with-linux=${kdir}/source"
"--with-linux-build=${kdir}/build"
];
installPhase = ''
make install
rm -rf $out/etc $out/sbin
'';
}