This commit is contained in:
mjallen18
2026-02-23 18:13:56 -06:00
parent 2e0d6aebb5
commit 4c5118c181
5 changed files with 215 additions and 3 deletions

View File

@@ -0,0 +1,47 @@
bcachefs-tools:
{
lib,
stdenv,
kernelModuleMakeFlags,
kernel,
}:
stdenv.mkDerivation {
pname = "bcachefs";
version = "${kernel.version}-${bcachefs-tools.version}";
__structuredAttrs = true;
src = bcachefs-tools.dkms;
nativeBuildInputs = kernel.moduleBuildDependencies;
enableParallelBuilding = true;
makeFlags = kernelModuleMakeFlags ++ [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"INSTALL_MOD_PATH=${placeholder "out"}"
];
installPhase = ''
runHook preInstall
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build M=$(pwd) modules_install "''${makeFlags[@]}" "''${installFlags[@]}"
runHook postInstall
'';
passthru = {
inherit (bcachefs-tools.passthru) tests;
};
meta = {
description = "out-of-tree bcachefs kernel module";
inherit (bcachefs-tools.meta)
homepage
downloadPage
license
maintainers
platforms
;
};
}