summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-03-20 19:45:40 +0100
committerGitHub <noreply@github.com>2022-03-20 19:45:40 +0100
commit9e77d2f9155aa6a677e9ff809e6775eb85445400 (patch)
tree7bb5f972d1d533ad2359dd94725e693c315d00ad
parentf31f71e8d67e8b81f49595c4c58718be85756358 (diff)
parent1502634e1afa3b3bf0fac86ca15b6c71f0f40530 (diff)
downloadnixpkgs-9e77d2f9155aa6a677e9ff809e6775eb85445400.tar
nixpkgs-9e77d2f9155aa6a677e9ff809e6775eb85445400.tar.gz
nixpkgs-9e77d2f9155aa6a677e9ff809e6775eb85445400.tar.bz2
nixpkgs-9e77d2f9155aa6a677e9ff809e6775eb85445400.tar.lz
nixpkgs-9e77d2f9155aa6a677e9ff809e6775eb85445400.tar.xz
nixpkgs-9e77d2f9155aa6a677e9ff809e6775eb85445400.tar.zst
nixpkgs-9e77d2f9155aa6a677e9ff809e6775eb85445400.zip
Merge pull request #164894 from nagy/rclone-fuse-path
-rw-r--r--pkgs/applications/networking/sync/rclone/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix
index e23ba5cdf2a..9ebd9db67f9 100644
--- a/pkgs/applications/networking/sync/rclone/default.nix
+++ b/pkgs/applications/networking/sync/rclone/default.nix
@@ -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; {