summary refs log tree commit diff
diff options
context:
space:
mode:
authorYongun Seong <nevivurn@nevi.dev>2023-05-20 23:53:50 +0900
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-05-20 18:13:50 -0300
commit65c526958983f4bd2620d2c69fda5fe1950ada8b (patch)
tree8c031528730f769a94fec41537be882aa8ea0f22
parent8bf3e834daedadc6d0f4172616b2bdede1109c48 (diff)
downloadnixpkgs-65c526958983f4bd2620d2c69fda5fe1950ada8b.tar
nixpkgs-65c526958983f4bd2620d2c69fda5fe1950ada8b.tar.gz
nixpkgs-65c526958983f4bd2620d2c69fda5fe1950ada8b.tar.bz2
nixpkgs-65c526958983f4bd2620d2c69fda5fe1950ada8b.tar.lz
nixpkgs-65c526958983f4bd2620d2c69fda5fe1950ada8b.tar.xz
nixpkgs-65c526958983f4bd2620d2c69fda5fe1950ada8b.tar.zst
nixpkgs-65c526958983f4bd2620d2c69fda5fe1950ada8b.zip
gnucash: fix finance-quote-wrapper exec
-rw-r--r--pkgs/applications/office/gnucash/0004-exec-fq-wrapper.patch12
-rw-r--r--pkgs/applications/office/gnucash/default.nix2
2 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/applications/office/gnucash/0004-exec-fq-wrapper.patch b/pkgs/applications/office/gnucash/0004-exec-fq-wrapper.patch
index e18337c7422..e2b81538046 100644
--- a/pkgs/applications/office/gnucash/0004-exec-fq-wrapper.patch
+++ b/pkgs/applications/office/gnucash/0004-exec-fq-wrapper.patch
@@ -1,5 +1,5 @@
 diff --git a/libgnucash/app-utils/gnc-quotes.cpp b/libgnucash/app-utils/gnc-quotes.cpp
-index 3003fca71f..e01cb10b50 100644
+index 3003fca71f..2f2b1398e1 100644
 --- a/libgnucash/app-utils/gnc-quotes.cpp
 +++ b/libgnucash/app-utils/gnc-quotes.cpp
 @@ -122,7 +122,6 @@ private:
@@ -10,7 +10,7 @@ index 3003fca71f..e01cb10b50 100644
      std::string c_fq_wrapper;
      std::string m_version;
      StrVec m_sources;
-@@ -145,7 +144,6 @@ static std::string parse_quotesource_error(const std::string& line);
+@@ -145,13 +144,12 @@ static std::string parse_quotesource_error(const std::string& line);
  static const std::string empty_string{};
  
  GncFQQuoteSource::GncFQQuoteSource() :
@@ -18,6 +18,13 @@ index 3003fca71f..e01cb10b50 100644
  m_version{}, m_sources{}, m_api_key{}
  {
      char *bindir = gnc_path_get_bindir();
+     c_fq_wrapper = std::string(bindir) + "/finance-quote-wrapper";
+     g_free(bindir);
+-    StrVec args{"-w", c_fq_wrapper, "-v"};
++    StrVec args{"-v"};
+     auto [rv, sources, errors] = run_cmd(args, empty_string);
+     if (rv)
+     {
 @@ -197,7 +195,7 @@ m_version{}, m_sources{}, m_api_key{}
  QuoteResult
  GncFQQuoteSource::get_quotes(const std::string& json_str) const
@@ -43,4 +50,3 @@ index 3003fca71f..e01cb10b50 100644
  				bp::std_out > out_buf,
  				bp::std_err > err_buf,
  				bp::std_in < input_buf,
-
diff --git a/pkgs/applications/office/gnucash/default.nix b/pkgs/applications/office/gnucash/default.nix
index 64a02e81116..f80467d827d 100644
--- a/pkgs/applications/office/gnucash/default.nix
+++ b/pkgs/applications/office/gnucash/default.nix
@@ -137,7 +137,7 @@ stdenv.mkDerivation rec {
       - Financial Calculations
     '';
     license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ domenkozar AndersonTorres rski ];
+    maintainers = with maintainers; [ domenkozar AndersonTorres rski nevivurn ];
     platforms = platforms.unix;
   };
 }