bcachefs-tools: add symlink for mount.bcachefs and fix runtime deps

This commit is contained in:
Jörg Thalheim 2022-12-29 17:35:25 +01:00
parent 13cd9acb77
commit 1e6cf6f3dc

View file

@ -13,9 +13,12 @@
, zstd , zstd
, lz4 , lz4
, python3Packages , python3Packages
, util-linux
, udev , udev
, valgrind , valgrind
, nixosTests , nixosTests
, makeWrapper
, getopt
, fuse3 , fuse3
, fuseSupport ? false , fuseSupport ? false
}: }:
@ -39,7 +42,9 @@ stdenv.mkDerivation {
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools" "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
''; '';
nativeBuildInputs = [ pkg-config docutils python3Packages.python ]; nativeBuildInputs = [
pkg-config docutils python3Packages.python makeWrapper
];
buildInputs = [ buildInputs = [
libuuid libscrypt libsodium keyutils liburcu zlib libaio libuuid libscrypt libsodium keyutils liburcu zlib libaio
@ -54,6 +59,13 @@ stdenv.mkDerivation {
rm tests/test_fuse.py 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"}" ]; installFlags = [ "PREFIX=${placeholder "out"}" ];
passthru.tests = { passthru.tests = {