diff --git a/pkgs/tools/filesystems/bcachefs-tools/default.nix b/pkgs/tools/filesystems/bcachefs-tools/default.nix index 4e52a1d9e567..a68166c8c275 100644 --- a/pkgs/tools/filesystems/bcachefs-tools/default.nix +++ b/pkgs/tools/filesystems/bcachefs-tools/default.nix @@ -13,9 +13,12 @@ , zstd , lz4 , python3Packages +, util-linux , udev , valgrind , nixosTests +, makeWrapper +, getopt , fuse3 , fuseSupport ? false }: @@ -39,7 +42,9 @@ stdenv.mkDerivation { "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools" ''; - nativeBuildInputs = [ pkg-config docutils python3Packages.python ]; + nativeBuildInputs = [ + pkg-config docutils python3Packages.python makeWrapper + ]; buildInputs = [ libuuid libscrypt libsodium keyutils liburcu zlib libaio @@ -54,6 +59,13 @@ stdenv.mkDerivation { rm tests/test_fuse.py ''; + # this symlink is needed for mount -t bcachefs to work + postFixup = '' + ln -s $out/bin/mount.bcachefs.sh $out/bin/mount.bcachefs + wrapProgram $out/bin/mount.bcachefs.sh \ + --prefix PATH : ${lib.makeBinPath [ getopt util-linux ]} + ''; + installFlags = [ "PREFIX=${placeholder "out"}" ]; passthru.tests = {