From 6e365f7d6079790d6033d63c12af0abdcc0dea9e Mon Sep 17 00:00:00 2001 From: Yongun Seong Date: Fri, 13 Oct 2023 21:25:09 +0900 Subject: [PATCH 1/2] gnucash: build and include documentation --- pkgs/applications/office/gnucash/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkgs/applications/office/gnucash/default.nix b/pkgs/applications/office/gnucash/default.nix index eacda570cc0c..8a1dd4680a4b 100644 --- a/pkgs/applications/office/gnucash/default.nix +++ b/pkgs/applications/office/gnucash/default.nix @@ -1,5 +1,6 @@ { lib , stdenv +, fetchFromGitHub , fetchurl , fetchpatch , aqbanking @@ -97,8 +98,25 @@ stdenv.mkDerivation rec { enableParallelChecking = true; checkTarget = "check"; + passthru.docs = stdenv.mkDerivation { + pname = "gnucash-docs"; + inherit version; + + src = fetchFromGitHub { + owner = "Gnucash"; + repo = "gnucash-docs"; + rev = version; + hash = "sha256-aPxQEcpo8SPv8lPQbxMl1wg8ijH9Rz0oo4K5lp3C/bw="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libxml2 libxslt ]; + }; + preFixup = '' gappsWrapperArgs+=( + # documentation + --prefix XDG_DATA_DIRS : ${passthru.docs}/share # db drivers location --set GNC_DBD_DIR ${libdbiDrivers}/lib/dbd # gsettings schema location on Nix From febe2cc288fc747d3e0260f72aa474f7216f1490 Mon Sep 17 00:00:00 2001 From: Yongun Seong Date: Wed, 8 Nov 2023 16:36:11 +0900 Subject: [PATCH 2/2] gnucash: avoid parameterizing pname --- pkgs/applications/office/gnucash/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/gnucash/default.nix b/pkgs/applications/office/gnucash/default.nix index 8a1dd4680a4b..7c378bc52a90 100644 --- a/pkgs/applications/office/gnucash/default.nix +++ b/pkgs/applications/office/gnucash/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { # raw source code doesn't work out of box; fetchFromGitHub not usable src = fetchurl { # Upstream uploaded a -1 tarball on the same release, remove on next release - url = "https://github.com/Gnucash/gnucash/releases/download/${version}/${pname}-${version}-1.tar.bz2"; + url = "https://github.com/Gnucash/gnucash/releases/download/${version}/gnucash-${version}-1.tar.bz2"; hash = "sha256-d0EWXW1lLqe0oehJjPQ5pWuBpcyLZTKRpZBU8jYqv8w="; }; @@ -120,7 +120,7 @@ stdenv.mkDerivation rec { # db drivers location --set GNC_DBD_DIR ${libdbiDrivers}/lib/dbd # gsettings schema location on Nix - --set GSETTINGS_SCHEMA_DIR ${glib.makeSchemaPath "$out" "${pname}-${version}"} + --set GSETTINGS_SCHEMA_DIR ${glib.makeSchemaPath "$out" "gnucash-${version}"} ) '';