doc/tauri: fix example, make openssl linux-only

(cherry picked from commit 0605191248)
This commit is contained in:
TomaSajt
2025-05-17 00:59:47 +02:00
committed by github-actions[bot]
parent 2a41154f7a
commit a105a3b79e

View File

@@ -30,8 +30,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
# Assuming our app's frontend uses `npm` as a package manager
npmDeps = fetchNpmDeps {
name = "${finalAttrs.pname}-npm-deps-${finalAttrs.version}";
inherit src;
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
inherit (finalAttrs) src;
hash = "...";
};
@@ -51,17 +51,16 @@ rustPlatform.buildRustPackage (finalAttrs: {
wrapGAppsHook4
];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isLinux [
glib-networking # Most Tauri apps need networking
webkitgtk_4_1
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
glib-networking # Most Tauri apps need networking
openssl
webkitgtk_4_1
];
# Set our Tauri source directory
cargoRoot = "src-tauri";
# And make sure we build there too
buildAndTestSubdir = cargoRoot;
buildAndTestSubdir = finalAttrs.cargoRoot;
# ...
})