Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / office / gnucash / 0004-exec-fq-wrapper.patch
blob8b00b275e59cd51ab480c7e7140db3514031f264
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 @@
5 class GncFQQuoteSource final : public GncQuoteSource
7 - const bfs::path c_cmd;
8 std::string c_fq_wrapper;
9 std::string m_version;
10 StrVec m_sources;
11 @@ -148,13 +147,12 @@
12 static const std::string empty_string{};
14 GncFQQuoteSource::GncFQQuoteSource() :
15 -c_cmd{bp::search_path("perl")},
16 m_version{}, m_sources{}, m_api_key{}
18 char *bindir = gnc_path_get_bindir();
19 c_fq_wrapper = std::string(bindir) + "/finance-quote-wrapper";
20 g_free(bindir);
21 - StrVec args{"-w", c_fq_wrapper, "-v"};
22 + StrVec args{"-v"};
23 auto [rv, sources, errors] = run_cmd(args, empty_string);
24 if (rv)
26 @@ -200,7 +198,7 @@
27 QuoteResult
28 GncFQQuoteSource::get_quotes(const std::string& json_str) const
30 - StrVec args{"-w", c_fq_wrapper, "-f" };
31 + StrVec args{"-f" };
32 return run_cmd(args, json_str);
35 @@ -218,7 +216,7 @@
36 auto input_buf = bp::buffer (json_string);
37 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,