gnucash: use webkitgtk_4_1, fix python support (#428027)

This commit is contained in:
Sandro
2025-07-26 01:10:24 +02:00
committed by GitHub
+23 -8
View File
@@ -10,6 +10,7 @@
gettext,
glib,
glibcLocales,
gobject-introspection,
gtest,
guile,
gwenhywfar,
@@ -24,12 +25,17 @@
perlPackages,
pkg-config,
swig,
webkitgtk_4_0,
webkitgtk_4_1,
wrapGAppsHook3,
python3,
replaceVars,
}:
let
py = python3.withPackages (
ps: with ps; [
pygobject3.out
]
);
in
stdenv.mkDerivation rec {
pname = "gnucash";
version = "5.11";
@@ -43,6 +49,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
gettext
gobject-introspection
makeWrapper
wrapGAppsHook3
pkg-config
@@ -69,8 +76,8 @@ stdenv.mkDerivation rec {
libxml2
libxslt
swig
webkitgtk_4_0
python3
webkitgtk_4_1
py
]
++ (with perlPackages; [
JSONParse
@@ -151,11 +158,16 @@ stdenv.mkDerivation rec {
# Perl wrapping
dontWrapGApps = true;
# gnucash is wrapped using the args constructed for wrapGAppsHook3.
# We could not find the python entrypoint and somehow it is used from PATH,
# so force to use the one with all dependencies
# gnc-fq-* are cli utils written in Perl hence the extra wrapping
postFixup = ''
wrapProgram $out/bin/gnucash "''${gappsWrapperArgs[@]}"
wrapProgram $out/bin/gnucash-cli "''${gappsWrapperArgs[@]}"
wrapProgram $out/bin/gnucash \
--prefix PATH : ${lib.makeBinPath [ py ]} \
"''${gappsWrapperArgs[@]}"
wrapProgram $out/bin/gnucash-cli \
--prefix PATH : ${lib.makeBinPath [ py ]} \
"''${gappsWrapperArgs[@]}"
wrapProgram $out/bin/finance-quote-wrapper \
--prefix PERL5LIB : "${
@@ -165,6 +177,9 @@ stdenv.mkDerivation rec {
FinanceQuote
]
}"
chmod +x $out/share/gnucash/python/pycons/*.py
patchShebangs $out/share/gnucash/python/pycons/*.py
'';
passthru.updateScript = ./update.sh;