Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / finance / denaro / default.nix
blob4da73b2a4e17ba10651c8f1da8141b7b170e8ccf
1 { lib
2 , buildDotnetModule
3 , fetchFromGitHub
4 , dotnetCorePackages
5 , gtk4
6 , libadwaita
7 , pkg-config
8 , wrapGAppsHook4
9 , glib
10 , shared-mime-info
11 , gdk-pixbuf
12 , blueprint-compiler
15 buildDotnetModule rec {
16   pname = "denaro";
17   version = "2023.9.2";
19   src = fetchFromGitHub {
20     owner = "NickvisionApps";
21     repo = "Denaro";
22     rev = version;
23     hash = "sha256-3Atdi0R7OHpP1HUBWGu2Y4L8hr9jLPMIFYCEWeoEq6A=";
24   };
26   dotnet-sdk = dotnetCorePackages.sdk_7_0;
27   dotnet-runtime = dotnetCorePackages.runtime_7_0;
29   projectFile = "NickvisionMoney.GNOME/NickvisionMoney.GNOME.csproj";
30   nugetDeps = ./deps.nix;
31   executables = "NickvisionMoney.GNOME";
33   nativeBuildInputs = [
34     pkg-config
35     wrapGAppsHook4
36     glib # For glib-compile-resources
37     shared-mime-info # For update-mime-database
38     gdk-pixbuf # Fixes icon missing in envs where GDK_PIXBUF_MODULE_FILE is not set
39     blueprint-compiler
40   ];
42   buildInputs = [ gtk4 libadwaita ]; # Used by blueprint-compiler
44   # Denaro switches installation tool frequently (bash -> just -> cake)
45   # For maintainability, let's do it ourselves
46   postInstall = ''
47     substituteInPlace NickvisionMoney.Shared/org.nickvision.money.desktop.in --replace '@EXEC@' "NickvisionMoney.GNOME"
48     install -Dm444 NickvisionMoney.Shared/Resources/org.nickvision.money.svg -t $out/share/icons/hicolor/scalable/apps/
49     install -Dm444 NickvisionMoney.Shared/Resources/org.nickvision.money-symbolic.svg -t $out/share/icons/hicolor/symbolic/apps/
50     install -Dm444 NickvisionMoney.Shared/org.nickvision.money.desktop.in -T $out/share/applications/org.nickvision.money.desktop
51   '';
53   runtimeDeps = [
54     gtk4
55     libadwaita
56     glib # Fixes "Could not retrieve parent type - is the typeid valid?"
57     gdk-pixbuf
58   ];
60   passthru.updateScript = ./update.sh;
62   meta = with lib; {
63     description = "Personal finance manager for GNOME";
64     homepage = "https://github.com/nlogozzo/NickvisionMoney";
65     mainProgram = "NickvisionMoney.GNOME";
66     license = licenses.mit;
67     changelog = "https://github.com/nlogozzo/NickvisionMoney/releases/tag/${version}";
68     maintainers = with maintainers; [ chuangzhu kashw2 ];
69     platforms = platforms.linux;
70   };