|
15 | 15 | webkitgtk_4_1, |
16 | 16 | openssl, |
17 | 17 | }: |
| 18 | + |
18 | 19 | let |
19 | 20 | pnpm = pnpm_10; |
| 21 | +in |
| 22 | +rustPlatform.buildRustPackage (finalAttrs: { |
20 | 23 | pname = "fedistar"; |
21 | 24 | version = "1.11.3"; |
| 25 | + |
22 | 26 | src = fetchFromGitHub { |
23 | 27 | owner = "h3poteto"; |
24 | 28 | repo = "fedistar"; |
25 | | - tag = "v${version}"; |
| 29 | + tag = "v${finalAttrs.version}"; |
26 | 30 | hash = "sha256-Q2j6K4ys/z77+n3kdGJ15rWbFlbbIHBWB9hOARsgg2A="; |
27 | 31 | }; |
28 | | - fedistar-frontend = stdenvNoCC.mkDerivation (finalAttrs: { |
29 | | - pname = "fedistar-frontend"; |
30 | | - inherit version src; |
31 | | - pnpmDeps = pnpm.fetchDeps { |
32 | | - inherit pname version src; |
33 | | - hash = "sha256-xXVsjAXmrsOp+mXrYAxSKz4vX5JApLZ+Rh6hrYlnJDI="; |
34 | | - }; |
35 | | - nativeBuildInputs = [ |
36 | | - pnpm.configHook |
37 | | - pnpm |
38 | | - nodejs |
39 | | - ]; |
40 | | - |
41 | | - buildPhase = '' |
42 | | - runHook preBuild |
43 | | - pnpm run build |
44 | | - runHook postBuild |
45 | | - ''; |
46 | 32 |
|
47 | | - installPhase = '' |
48 | | - runHook preInstall |
49 | | - mkdir -p $out |
50 | | - cp -r out/* $out/ |
51 | | - runHook postInstall |
52 | | - ''; |
53 | | - }); |
54 | | - |
55 | | -in |
56 | | -rustPlatform.buildRustPackage { |
57 | | - inherit |
58 | | - pname |
59 | | - version |
60 | | - src |
61 | | - fedistar-frontend |
62 | | - ; |
63 | | - sourceRoot = "${src.name}/src-tauri"; |
| 33 | + cargoRoot = "src-tauri"; |
| 34 | + buildAndTestSubdir = "src-tauri"; |
64 | 35 |
|
65 | 36 | useFetchCargoVendor = true; |
66 | 37 | cargoHash = "sha256-ZJgyrFDtzAH3XqDdnJ27Yn+WsTMrZR2+lnkZ6bw6hzg="; |
67 | 38 |
|
68 | | - postPatch = '' |
69 | | - substituteInPlace ./tauri.conf.json \ |
70 | | - --replace-fail '"frontendDist": "../out",' '"frontendDist": "${fedistar-frontend}",' \ |
71 | | - --replace-fail '"beforeBuildCommand": "pnpm build",' '"beforeBuildCommand": "",' |
72 | | - ''; |
| 39 | + pnpmDeps = pnpm.fetchDeps { |
| 40 | + inherit (finalAttrs) pname version src; |
| 41 | + hash = "sha256-xXVsjAXmrsOp+mXrYAxSKz4vX5JApLZ+Rh6hrYlnJDI="; |
| 42 | + }; |
73 | 43 |
|
74 | 44 | nativeBuildInputs = [ |
75 | 45 | cargo-tauri.hook |
76 | 46 |
|
| 47 | + pnpm.configHook |
| 48 | + pnpm |
| 49 | + nodejs |
| 50 | + |
77 | 51 | pkg-config |
78 | 52 | wrapGAppsHook4 |
79 | 53 | ]; |
@@ -107,6 +81,6 @@ rustPlatform.buildRustPackage { |
107 | 81 | mainProgram = "fedistar"; |
108 | 82 | license = lib.licenses.gpl3Only; |
109 | 83 | maintainers = with lib.maintainers; [ noodlez1232 ]; |
110 | | - changelog = "https://github.com/h3poteto/fedistar/releases/tag/v${version}"; |
| 84 | + changelog = "https://github.com/h3poteto/fedistar/releases/tag/v${finalAttrs.version}"; |
111 | 85 | }; |
112 | | -} |
| 86 | +}) |
0 commit comments