gnucash: 5.8 -> 5.9

- Diff: https://github.com/Gnucash/gnucash/compare/5.8...5.9
- Update exec-fq-wrapper patch to apply cleanly
- Remove test-lots patch, fixed upstream
- Add patch to fix gnucash-cli -Q dump, remove on next release

+23 -39
+13 -22
pkgs/by-name/gn/gnucash/0004-exec-fq-wrapper.patch
··· 1 - --- a/libgnucash/app-utils/gnc-quotes.cpp 2023-09-23 07:04:21.000000000 +0900 2 - +++ b/libgnucash/app-utils/gnc-quotes.cpp 2023-09-25 11:58:46.482696433 +0900 3 - @@ -125,7 +125,6 @@ 1 + --- a/libgnucash/app-utils/gnc-quotes.cpp 2023-09-23 07:04:21.000000000 +0900 2 + +++ b/libgnucash/app-utils/gnc-quotes.cpp 2023-09-25 11:58:46.482696433 +0900 3 + @@ -129,7 +129,6 @@ 4 4 5 5 class GncFQQuoteSource final : public GncQuoteSource 6 6 { ··· 8 8 std::string c_fq_wrapper; 9 9 std::string m_version; 10 10 StrVec m_sources; 11 - @@ -148,13 +147,12 @@ 11 + @@ -152,13 +151,12 @@ 12 12 static const std::string empty_string{}; 13 13 14 14 GncFQQuoteSource::GncFQQuoteSource() : 15 15 -c_cmd{bp::search_path("perl")}, 16 - m_version{}, m_sources{}, m_api_key{} 16 + m_version{}, m_sources{}, m_env{boost::this_process::environment()} 17 17 { 18 18 char *bindir = gnc_path_get_bindir(); 19 19 c_fq_wrapper = std::string(bindir) + "/finance-quote-wrapper"; ··· 23 23 auto [rv, sources, errors] = run_cmd(args, empty_string); 24 24 if (rv) 25 25 { 26 - @@ -200,7 +198,7 @@ 26 + @@ -192,7 +190,7 @@ 27 27 QuoteResult 28 28 GncFQQuoteSource::get_quotes(const std::string& json_str) const 29 29 { ··· 32 32 return run_cmd(args, json_str); 33 33 } 34 34 35 - @@ -218,7 +216,7 @@ 35 + @@ -209,7 +207,7 @@ 36 + 36 37 auto input_buf = bp::buffer (json_string); 37 38 bp::child process; 38 - if (m_api_key.empty()) 39 - - process = bp::child(c_cmd, args, 40 - + process = bp::child(c_fq_wrapper, args, 41 - bp::std_out > out_buf, 42 - bp::std_err > err_buf, 43 - bp::std_in < input_buf, 44 - @@ -227,7 +225,7 @@ 45 - #endif 46 - svc); 47 - else 48 - - process = bp::child(c_cmd, args, 49 - + process = bp::child(c_fq_wrapper, args, 50 - bp::std_out > out_buf, 51 - bp::std_err > err_buf, 52 - bp::std_in < input_buf, 39 + - process = bp::child(c_cmd, args, 40 + + process = bp::child(c_fq_wrapper, args, 41 + bp::std_out > out_buf, 42 + bp::std_err > err_buf, 43 + bp::std_in < input_buf,
-11
pkgs/by-name/gn/gnucash/0005-disable-test-lots.patch
··· 1 - --- a/libgnucash/engine/test/CMakeLists.txt 2024-02-23 09:05:19.000000000 +0900 2 - +++ b/libgnucash/engine/test/CMakeLists.txt 2024-05-08 22:08:04.572060359 +0900 3 - @@ -57,7 +57,6 @@ 4 - 5 - add_engine_test(test-account-object test-account-object.cpp) 6 - add_engine_test(test-group-vs-book test-group-vs-book.cpp) 7 - -add_engine_test(test-lots test-lots.cpp) 8 - add_engine_test(test-querynew test-querynew.c) 9 - add_engine_test(test-query test-query.cpp) 10 - add_engine_test(test-split-vs-account test-split-vs-account.cpp) 11 -
+10 -6
pkgs/by-name/gn/gnucash/package.nix
··· 2 2 , stdenv 3 3 , fetchFromGitHub 4 4 , fetchurl 5 + , fetchpatch2 5 6 , aqbanking 6 7 , boost 7 8 , cmake ··· 27 28 28 29 stdenv.mkDerivation rec { 29 30 pname = "gnucash"; 30 - version = "5.8"; 31 + version = "5.9"; 31 32 32 33 # raw source code doesn't work out of box; fetchFromGitHub not usable 33 34 src = fetchurl { 34 35 url = "https://github.com/Gnucash/gnucash/releases/download/${version}/gnucash-${version}.tar.bz2"; 35 - hash = "sha256-osgj+3ALnUWYaS7IE5SVm944jY7xke/k6iwCQmu1JZM="; 36 + hash = "sha256-W+LlNk/DZGT8Msdo4qtGCmMPdNtq631EJm49q5giL9A="; 36 37 }; 37 38 38 39 nativeBuildInputs = [ ··· 75 76 ./0003-remove-valgrind.patch 76 77 # this patch makes gnucash exec the Finance::Quote wrapper directly 77 78 ./0004-exec-fq-wrapper.patch 78 - # this patch disables a flaky test 79 - # see https://bugs.gnucash.org/show_bug.cgi?id=799289 80 - ./0005-disable-test-lots.patch 79 + # this patch fixes gnucah-cli -Q dump, remove on next release 80 + (fetchpatch2 { 81 + name = "0005-fix-quote-report.patch"; 82 + url = "https://github.com/Gnucash/gnucash/commit/711554ecd5505004aee4808519d9d8e4e4ed7c9a.patch?full_index=1"; 83 + hash = "sha256-uRaUdSJu2LnYVp/3DqrK0rTnCpr7oZRtrgTPbKAHThk="; 84 + }) 81 85 ]; 82 86 83 87 # this needs to be an environment variable and not a cmake flag to suppress ··· 101 105 owner = "Gnucash"; 102 106 repo = "gnucash-docs"; 103 107 rev = version; 104 - hash = "sha256-3b1Nue3eEefDi4WI+o3ATfrsQ+H/I+QwTr4Nuc9J7Zg="; 108 + hash = "sha256-uXpIAsucVUaAlqYTKfrfBg04Kb5Mza67l0ZU6fxkSUY="; 105 109 }; 106 110 107 111 nativeBuildInputs = [ cmake ];