25 src = fetchFromGitHub {
29 hash = "sha256-3Al58jg+pYP46VbpIRbYBhMOG6m7OQaC0pxKawX12E8=";
32 vendorHash = "sha256-PCj/f/oeLEAC/yFmR5dSyoLb45Z1fPLAASBaM251+Mc=";
34 subPackages = [ "." ];
41 buildInputs = lib.optional enableCmount (
42 if stdenv.hostPlatform.isDarwin then macfuse-stubs else fuse
45 tags = lib.optionals enableCmount [ "cmount" ];
50 "-X github.com/rclone/rclone/fs.Version=${version}"
53 postConfigure = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
54 substituteInPlace vendor/github.com/winfsp/cgofuse/fuse/host_cgo.go \
55 --replace-fail '"libfuse.so.2"' '"${lib.getLib fuse}/lib/libfuse.so.2"'
61 if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
64 lib.getBin buildPackages.rclone;
67 installManPage rclone.1
68 for shell in bash zsh fish; do
69 ${rcloneBin}/bin/rclone genautocomplete $shell rclone.$shell
70 installShellCompletion rclone.$shell
74 ln -s $out/bin/rclone $out/bin/rclonefs
75 ln -s $out/bin/rclone $out/bin/mount.rclone
78 lib.optionalString (enableCmount && !stdenv.hostPlatform.isDarwin)
79 # use --suffix here to ensure we don't shadow /run/wrappers/bin/fusermount3,
80 # as the setuid wrapper is required as non-root on NixOS.
82 wrapProgram $out/bin/rclone \
83 --suffix PATH : "${lib.makeBinPath [ fuse3 ]}"
91 description = "Command line program to sync files and directories to and from major cloud storage";
92 homepage = "https://rclone.org";
93 changelog = "https://github.com/rclone/rclone/blob/v${version}/docs/content/changelog.md";
94 license = licenses.mit;
95 mainProgram = "rclone";
96 maintainers = with maintainers; [