bcachefs-tools: don't assume modprobe is in the PATH

This was kind of non-obvious to figure out. See
https://github.com/koverstreet/bcachefs-tools/issues/521 upstream for
more information.

I don't know if there are downsides to making this package depend on
`kmod`.
This commit is contained in:
Jeremy Fleischman
2026-02-23 13:39:25 -08:00
parent e79ef3bb1e
commit 0f6baead66
@@ -6,6 +6,7 @@
libuuid,
libsodium,
keyutils,
kmod,
liburcu,
zlib,
libaio,
@@ -45,6 +46,9 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
substituteInPlace Makefile \
--replace-fail "target/release/bcachefs" "target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/bcachefs"
substituteInPlace src/commands/mount.rs \
--replace-fail 'std::process::Command::new("modprobe")' 'std::process::Command::new("${lib.getExe' kmod "modprobe"}")'
'';
nativeBuildInputs = [