From 4513cdf164f0db87afc72a4036bcaa9ddc420d4f Mon Sep 17 00:00:00 2001 From: kataokatsuki Date: Tue, 26 May 2026 14:56:40 +0900 Subject: [PATCH] rclone: fix build on Darwin --- pkgs/by-name/rc/rclone/package.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/rc/rclone/package.nix b/pkgs/by-name/rc/rclone/package.nix index b16697db83a3..bf9adacb7452 100644 --- a/pkgs/by-name/rc/rclone/package.nix +++ b/pkgs/by-name/rc/rclone/package.nix @@ -9,6 +9,7 @@ makeWrapper, enableCmount ? true, fuse3, + macfuse-stubs, librclone, nix-update-script, }: @@ -38,9 +39,14 @@ buildGoModule (finalAttrs: { makeWrapper ]; - buildInputs = lib.optional enableCmount fuse3; + buildInputs = lib.optional enableCmount ( + # cgofuse uses the fuse2 header locations on darwin + if stdenv.hostPlatform.isDarwin then (macfuse-stubs.override { isFuse3 = false; }) else fuse3 + ); - tags = [ "fuse3" ] ++ lib.optionals enableCmount [ "cmount" ]; + tags = + lib.optionals (!stdenv.hostPlatform.isDarwin) [ "fuse3" ] + ++ lib.optionals enableCmount [ "cmount" ]; ldflags = [ "-s"