From 3aedf37e03aa3ef27a6f27c62395e860c138eda2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalle=20Ahlstr=C3=B6m?= Date: Thu, 15 May 2025 19:13:12 +0200 Subject: [PATCH 1/2] rquickshare: fix darwin build --- pkgs/by-name/rq/rquickshare/package.nix | 56 +++++++++++-------- .../remove-code-signing-darwin.patch | 12 ++++ 2 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 pkgs/by-name/rq/rquickshare/remove-code-signing-darwin.patch diff --git a/pkgs/by-name/rq/rquickshare/package.nix b/pkgs/by-name/rq/rquickshare/package.nix index f52cc543beb5..6f30e1309874 100644 --- a/pkgs/by-name/rq/rquickshare/package.nix +++ b/pkgs/by-name/rq/rquickshare/package.nix @@ -69,37 +69,45 @@ rustPlatform.buildRustPackage rec { useFetchCargoVendor = true; cargoRoot = "app/${app-type}/src-tauri"; buildAndTestSubdir = cargoRoot; - cargoPatches = [ ./remove-duplicate-versions-of-sys-metrics.patch ]; + cargoPatches = [ + ./remove-duplicate-versions-of-sys-metrics.patch + ./remove-code-signing-darwin.patch + ]; cargoHash = app-type-either "sha256-XfN+/oC3lttDquLfoyJWBaFfdjW/wyODCIiZZksypLM=" "sha256-4vBHxuKg4P9H0FZYYNUT+AVj4Qvz99q7Bhd7x47UC2w="; - nativeBuildInputs = [ - proper-cargo-tauri.hook + nativeBuildInputs = + [ + proper-cargo-tauri.hook - # Setup pnpm - nodejs - pnpm_9.configHook + # Setup pnpm + nodejs + pnpm_9.configHook - # Make sure we can find our libraries - perl - pkg-config - protobuf - wrapGAppsHook4 - ]; + # Make sure we can find our libraries + perl + pkg-config + protobuf + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + wrapGAppsHook4 + ]; buildInputs = [ openssl ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - glib-networking - libayatana-appindicator - ] - ++ lib.optionals (app-type == "main") [ - webkitgtk_4_1 - libsoup_3 - ] - ++ lib.optionals (app-type == "legacy") [ - webkitgtk_4_0 - libsoup_2_4 - ]; + ++ lib.optionals stdenv.hostPlatform.isLinux ( + [ + glib-networking + libayatana-appindicator + ] + ++ lib.optionals (app-type == "main") [ + webkitgtk_4_1 + libsoup_3 + ] + ++ lib.optionals (app-type == "legacy") [ + webkitgtk_4_0 + libsoup_2_4 + ] + ); passthru = # Don't set an update script for the legacy version diff --git a/pkgs/by-name/rq/rquickshare/remove-code-signing-darwin.patch b/pkgs/by-name/rq/rquickshare/remove-code-signing-darwin.patch new file mode 100644 index 000000000000..d1f3fa910394 --- /dev/null +++ b/pkgs/by-name/rq/rquickshare/remove-code-signing-darwin.patch @@ -0,0 +1,12 @@ +diff --git a/app/main/src-tauri/tauri.conf.json b/app/main/src-tauri/tauri.conf.json +index 1114b19..c4cc8f4 100644 +--- a/app/main/src-tauri/tauri.conf.json ++++ b/app/main/src-tauri/tauri.conf.json +@@ -23,7 +23,6 @@ + "macOS": { + "frameworks": [], + "exceptionDomain": "", +- "signingIdentity": "-", + "providerShortName": null, + "entitlements": null + }, From bedc1f26c3513dc04215af272f16facc353d8176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalle=20Ahlstr=C3=B6m?= Date: Thu, 15 May 2025 23:21:14 +0200 Subject: [PATCH 2/2] doc/tauri: move wrapGAppsHook4 to only be included in linux builds --- doc/hooks/tauri.section.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/hooks/tauri.section.md b/doc/hooks/tauri.section.md index 8382d8c27316..2908f5ff24f2 100644 --- a/doc/hooks/tauri.section.md +++ b/doc/hooks/tauri.section.md @@ -35,18 +35,21 @@ rustPlatform.buildRustPackage (finalAttrs: { hash = "..."; }; - nativeBuildInputs = [ - # Pull in our main hook - cargo-tauri.hook + nativeBuildInputs = + [ + # Pull in our main hook + cargo-tauri.hook - # Setup npm - nodejs - npmHooks.npmConfigHook + # Setup npm + nodejs + npmHooks.npmConfigHook - # Make sure we can find our libraries - pkg-config - wrapGAppsHook4 - ]; + # Make sure we can find our libraries + pkg-config + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + wrapGAppsHook4 + ]; buildInputs = [ openssl ]