1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cargo-tauri,
6 jq,
7 libsoup_3,
8 moreutils,
9 nodejs,
10 openssl,
11 pkg-config,
12 pnpm_9,
13 rustPlatform,
14 webkitgtk_4_1,
15 wrapGAppsHook3,
16 nix-update-script,
17}:
18
19stdenv.mkDerivation (finalAttrs: {
20 pname = "wealthfolio";
21 version = "1.1.6";
22
23 src = fetchFromGitHub {
24 owner = "afadil";
25 repo = "wealthfolio";
26 rev = "v${finalAttrs.version}";
27 hash = "sha256-YjCAMWyGSEEC4NhSKxWbaP11yP9xLs5Mk5B+NZRQwDo=";
28 };
29
30 pnpmDeps = pnpm_9.fetchDeps {
31 inherit (finalAttrs) src pname version;
32 fetcherVersion = 1;
33 hash = "sha256-KupqObdNrnWbbt9C4NNmgmQCfJ2O4FjJBwGy6XQhhHg=";
34 };
35
36 cargoRoot = "src-tauri";
37 buildAndTestSubdir = finalAttrs.cargoRoot;
38
39 cargoDeps = rustPlatform.fetchCargoVendor {
40 inherit (finalAttrs)
41 pname
42 version
43 src
44 cargoRoot
45 ;
46 hash = "sha256-scgo526LDZTj7XHiX4/hF8PRPJuA7ul8DD3kIZyPUKs=";
47 };
48
49 nativeBuildInputs = [
50 cargo-tauri.hook
51 jq
52 moreutils
53 nodejs
54 pkg-config
55 pnpm_9.configHook
56 rustPlatform.cargoSetupHook
57 wrapGAppsHook3
58 ];
59
60 buildInputs = [
61 libsoup_3
62 openssl
63 webkitgtk_4_1
64 ];
65
66 postPatch = ''
67 jq \
68 '.plugins.updater.endpoints = [ ]
69 | .bundle.createUpdaterArtifacts = false' \
70 src-tauri/tauri.conf.json \
71 | sponge src-tauri/tauri.conf.json
72 '';
73
74 passthru.updateScript = nix-update-script { };
75
76 meta = {
77 description = "Beautiful Private and Secure Desktop Investment Tracking Application";
78 homepage = "https://wealthfolio.app/";
79 license = lib.licenses.agpl3Only;
80 mainProgram = "wealthfolio";
81 maintainers = with lib.maintainers; [ kilianar ];
82 platforms = lib.platforms.linux;
83 };
84})