Skip to content

Commit 3fcbdcf

Browse files
authored
doc/tauri: fix example, make openssl linux-only (#407756)
2 parents 73d665e + 0605191 commit 3fcbdcf

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

doc/hooks/tauri.section.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
3030
3131
# Assuming our app's frontend uses `npm` as a package manager
3232
npmDeps = fetchNpmDeps {
33-
name = "${finalAttrs.pname}-npm-deps-${finalAttrs.version}";
34-
inherit src;
33+
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
34+
inherit (finalAttrs) src;
3535
hash = "...";
3636
};
3737
@@ -51,17 +51,16 @@ rustPlatform.buildRustPackage (finalAttrs: {
5151
wrapGAppsHook4
5252
];
5353
54-
buildInputs =
55-
[ openssl ]
56-
++ lib.optionals stdenv.hostPlatform.isLinux [
57-
glib-networking # Most Tauri apps need networking
58-
webkitgtk_4_1
59-
];
54+
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
55+
glib-networking # Most Tauri apps need networking
56+
openssl
57+
webkitgtk_4_1
58+
];
6059
6160
# Set our Tauri source directory
6261
cargoRoot = "src-tauri";
6362
# And make sure we build there too
64-
buildAndTestSubdir = cargoRoot;
63+
buildAndTestSubdir = finalAttrs.cargoRoot;
6564
6665
# ...
6766
})

0 commit comments

Comments
 (0)