Unverified Commit 0f6baead authored by Jeremy Fleischman's avatar Jeremy Fleischman
Browse files

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`.
parent e79ef3bb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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 = [