1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-09 17:46:29 +09:00

doc/tauri: use tauri 2.0 dependencies & new darwin SDK pattern in example (#357148)

* doc/tauri: use tauri 2.0 dependencies in example

* doc/tauri: use new darwin SDK pattern in example

Part of https://github.com/NixOS/nixpkgs/issues/354146
This commit is contained in:
seth 2024-12-04 00:31:45 -05:00 committed by GitHub
parent 180472d36d
commit ed6c067f25
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -14,15 +14,13 @@ In Nixpkgs, `cargo-tauri.hook` overrides the default build and install phases.
rustPlatform, rustPlatform,
fetchNpmDeps, fetchNpmDeps,
cargo-tauri, cargo-tauri,
darwin,
glib-networking, glib-networking,
libsoup,
nodejs, nodejs,
npmHooks, npmHooks,
openssl, openssl,
pkg-config, pkg-config,
webkitgtk_4_0, webkitgtk_4_1,
wrapGAppsHook3, wrapGAppsHook4,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
@ -47,25 +45,15 @@ rustPlatform.buildRustPackage rec {
# Make sure we can find our libraries # Make sure we can find our libraries
pkg-config pkg-config
wrapGAppsHook3 wrapGAppsHook4
]; ];
buildInputs = buildInputs =
[ openssl ] [ openssl ]
++ lib.optionals stdenv.hostPlatform.isLinux [ ++ lib.optionals stdenv.hostPlatform.isLinux [
glib-networking # Most Tauri apps need networking glib-networking # Most Tauri apps need networking
libsoup webkitgtk_4_1
webkitgtk_4_0 ];
]
++ lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks;
[
AppKit
CoreServices
Security
WebKit
]
);
# Set our Tauri source directory # Set our Tauri source directory
cargoRoot = "src-tauri"; cargoRoot = "src-tauri";