rclone: prefix PATH of fuse

This is needed because `rclone` makes use of `fusermount` when mounting
filesystems.
This commit is contained in:
Daniel Nagy
2022-03-19 23:17:48 +01:00
parent 6b5006b249
commit 1502634e1a
@@ -40,8 +40,13 @@ buildGoModule rec {
${rcloneBin}/bin/rclone genautocomplete $shell rclone.$shell
installShellCompletion rclone.$shell
done
'' + lib.optionalString (enableCmount && !stdenv.isDarwin) ''
wrapProgram $out/bin/rclone --prefix LD_LIBRARY_PATH : "${fuse}/lib"
'' + lib.optionalString (enableCmount && !stdenv.isDarwin)
# use --suffix here to ensure we don't shadow /run/wrappers/bin/fusermount,
# as the setuid wrapper is required as non-root on NixOS.
''
wrapProgram $out/bin/rclone \
--suffix PATH : "${lib.makeBinPath [ fuse ] }" \
--prefix LD_LIBRARY_PATH : "${fuse}/lib"
'';
meta = with lib; {