From 0f6baead66be396579d84de743825a3f07e512d0 Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Mon, 23 Feb 2026 13:36:38 -0800 Subject: [PATCH] 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`. --- pkgs/by-name/bc/bcachefs-tools/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/bc/bcachefs-tools/package.nix b/pkgs/by-name/bc/bcachefs-tools/package.nix index 1ce6bd467a7a..d39098774fb0 100644 --- a/pkgs/by-name/bc/bcachefs-tools/package.nix +++ b/pkgs/by-name/bc/bcachefs-tools/package.nix @@ -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 = [