mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
doc: use finalAttrs
pattern
This commit is contained in:
parent
47f000d991
commit
b4515ff6c2
8 changed files with 57 additions and 55 deletions
|
@ -23,15 +23,15 @@ In Nixpkgs, `cargo-tauri.hook` overrides the default build and install phases.
|
|||
wrapGAppsHook4,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
# . . .
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
# ...
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "...";
|
||||
|
||||
# Assuming our app's frontend uses `npm` as a package manager
|
||||
npmDeps = fetchNpmDeps {
|
||||
name = "${pname}-npm-deps-${version}";
|
||||
name = "${finalAttrs.pname}-npm-deps-${finalAttrs.version}";
|
||||
inherit src;
|
||||
hash = "...";
|
||||
};
|
||||
|
@ -61,8 +61,8 @@ rustPlatform.buildRustPackage rec {
|
|||
# And make sure we build there too
|
||||
buildAndTestSubdir = cargoRoot;
|
||||
|
||||
# . . .
|
||||
}
|
||||
# ...
|
||||
})
|
||||
```
|
||||
|
||||
## Variables controlling cargo-tauri {#tauri-hook-variables-controlling}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue