all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#75317] [PATCH 0/6] gnu: gnucash: Fix getting quotes
@ 2025-01-03 14:14 Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 1/6] gnu: gnucash: Fix locating perl binary Tomas Volf
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Tomas Volf @ 2025-01-03 14:14 UTC (permalink / raw)
  To: 75317; +Cc: Tomas Volf

It seems the ability to fetch quotes for stocks and currencies from the
internet has bit-rotten a bit.  This series fixed that.

Tomas Volf (6):
  gnu: gnucash: Fix locating perl binary.
  gnu: gnucash: Do not install gnc-fq-update.
  gnu: gnucash: Drop special case for gnc-fq-helper.
  gnu: gnucash: Do not wrap finance-quote-wrapper.
  gnu: perl-finance-quote: Update to 1.64.
  gnu: gnucash: Update to 5.10.

 gnu/packages/gnucash.scm | 53 +++++++++++++++++++++++++---------------
 gnu/packages/web.scm     |  4 +--
 2 files changed, 35 insertions(+), 22 deletions(-)

--
2.46.0




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#75317] [PATCH 1/6] gnu: gnucash: Fix locating perl binary.
  2025-01-03 14:14 [bug#75317] [PATCH 0/6] gnu: gnucash: Fix getting quotes Tomas Volf
@ 2025-01-03 14:24 ` Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 2/6] gnu: gnucash: Do not install gnc-fq-update Tomas Volf
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tomas Volf @ 2025-01-03 14:24 UTC (permalink / raw)
  To: 75317; +Cc: Tomas Volf

It tried to search in the $PATH, that does not really work for Guix.

* gnu/packages/gnucash.scm (gnucash)[arguments]<#:phases>: Add set-perl-path.

Change-Id: I93468c201de8af3ad76cce945483b76f28ea2749
---
 gnu/packages/gnucash.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 71a49b75d6..6df2b76505 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -102,6 +102,11 @@ (define-public gnucash
               (substitute* "CMakeLists.txt"
                 (("set\\(SHELL /bin/bash\\)")
                  (string-append "set(SHELL " (which "bash") ")")))))
+          (add-after 'unpack 'set-perl-path
+            (lambda _
+              (substitute* "libgnucash/app-utils/gnc-quotes.cpp"
+                (("c_cmd\\{bp::search_path\\(\"perl\"\\)\\}")
+                 (format #f "c_cmd{~s}" #$(file-append perl "/bin/perl"))))))
           ;; The qof test requires the en_US, en_GB, and fr_FR locales.
           (add-before 'check 'install-locales
             (lambda _
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#75317] [PATCH 2/6] gnu: gnucash: Do not install gnc-fq-update.
  2025-01-03 14:14 [bug#75317] [PATCH 0/6] gnu: gnucash: Fix getting quotes Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 1/6] gnu: gnucash: Fix locating perl binary Tomas Volf
@ 2025-01-03 14:24 ` Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 3/6] gnu: gnucash: Drop special case for gnc-fq-helper Tomas Volf
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tomas Volf @ 2025-01-03 14:24 UTC (permalink / raw)
  To: 75317; +Cc: Tomas Volf

This binary is used only for updating Finance::Quote from CPAN.  That does not
make sense on Guix, so do not install it.

* gnu/packages/gnucash.scm (gnucash)[arguments]<#:phases>: Add
delete-gnc-fq-update.

Change-Id: I93cf6d67166cce5970d48eea42de0ee5a5a9a8f8
---
 gnu/packages/gnucash.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 6df2b76505..7ac7cb0d8f 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -160,12 +160,16 @@ (define-public gnucash
                                     (map (lambda (l)
                                            (assoc l (package-inputs this-package)))
                                          '("perl-finance-quote")))))))))
-               '("gnucash"
-                 "gnc-fq-update"))))
+               '("gnucash"))))
           (add-after 'install 'glib-or-gtk-compile-schemas
             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
           (add-after 'install 'glib-or-gtk-wrap
-            (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
+            (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
+          (add-before 'glib-or-gtk-wrap 'delete-gnc-fq-update
+            (lambda _
+              ;; We are not updating Finance::Quote from CPAN.  There is no
+              ;; reason to install this binary.
+              (delete-file (string-append #$output "/bin/gnc-fq-update")))))))
     (native-inputs
      (list gmp
            `(,glib "bin")               ;glib-compile-schemas, etc.
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#75317] [PATCH 3/6] gnu: gnucash: Drop special case for gnc-fq-helper.
  2025-01-03 14:14 [bug#75317] [PATCH 0/6] gnu: gnucash: Fix getting quotes Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 1/6] gnu: gnucash: Fix locating perl binary Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 2/6] gnu: gnucash: Do not install gnc-fq-update Tomas Volf
@ 2025-01-03 14:24 ` Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 4/6] gnu: gnucash: Do not wrap finance-quote-wrapper Tomas Volf
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tomas Volf @ 2025-01-03 14:24 UTC (permalink / raw)
  To: 75317; +Cc: Tomas Volf

The file does not exist since 2022, and date-manip is not required for its
replacement (finance-quote-wrapper).

* gnu/packages/gnucash.scm (gnucash)[arguments]<#:phases>{'wrap-programs}:
Remove special case for gnc-fq-helper.
[inputs]: Remove perl-date-manip.

Change-Id: Id88906df2bda08ae90a9aebb5deef8e4cbae6c76
---
 gnu/packages/gnucash.scm | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 7ac7cb0d8f..12a168d6fd 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -146,20 +146,12 @@ (define-public gnucash
                      ,(map (lambda (o)
                              (string-append o "/lib/perl5/site_perl/"
                                             #$(package-version perl)))
-                           (if (string=? prog "gnc-fq-helper")
-                               (list
-                                #$@(transitive-input-references
-                                    'inputs
-                                    (map (lambda (l)
-                                           (assoc l (package-inputs this-package)))
-                                         '("perl-finance-quote"
-                                           "perl-date-manip"))))
-                               (list
-                                #$@(transitive-input-references
-                                    'inputs
-                                    (map (lambda (l)
-                                           (assoc l (package-inputs this-package)))
-                                         '("perl-finance-quote")))))))))
+                           (list
+                            #$@(transitive-input-references
+                                'inputs
+                                (map (lambda (l)
+                                       (assoc l (package-inputs this-package)))
+                                     '("perl-finance-quote"))))))))
                '("gnucash"))))
           (add-after 'install 'glib-or-gtk-compile-schemas
             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
@@ -192,7 +184,6 @@ (define-public gnucash
            libofx
            libxml2
            libxslt
-           perl-date-manip
            perl-finance-quote
            perl-json
            perl-json-parse
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#75317] [PATCH 4/6] gnu: gnucash: Do not wrap finance-quote-wrapper.
  2025-01-03 14:14 [bug#75317] [PATCH 0/6] gnu: gnucash: Fix getting quotes Tomas Volf
                   ` (2 preceding siblings ...)
  2025-01-03 14:24 ` [bug#75317] [PATCH 3/6] gnu: gnucash: Drop special case for gnc-fq-helper Tomas Volf
@ 2025-01-03 14:24 ` Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 5/6] gnu: perl-finance-quote: Update to 1.64 Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 6/6] gnu: gnucash: Update to 5.10 Tomas Volf
  5 siblings, 0 replies; 7+ messages in thread
From: Tomas Volf @ 2025-01-03 14:24 UTC (permalink / raw)
  To: 75317; +Cc: Tomas Volf

The file needs no special wrapping.  Even before, it was wrapped just by
accident (via the glib-or-gtk-wrap phase).  Wrapping changes it from perl
script to shell script and gnucash cannot deal with that.  So stop wrapping
it.

* gnu/packages/gnucash.scm (gnucash)[arguments]<#:phases>: Add 'unwrap-some.
Wrap gnucash-cli in 'wrap-programs.

Change-Id: I60e7ac5cf40fb00f9620b9ee9d725770009721d2
---
 gnu/packages/gnucash.scm | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 12a168d6fd..3f4967b2ef 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -151,8 +151,10 @@ (define-public gnucash
                                 'inputs
                                 (map (lambda (l)
                                        (assoc l (package-inputs this-package)))
-                                     '("perl-finance-quote"))))))))
-               '("gnucash"))))
+                                     '("perl-json-parse"
+                                       "perl-finance-quote"))))))))
+               '("gnucash"
+                 "gnucash-cli"))))
           (add-after 'install 'glib-or-gtk-compile-schemas
             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
           (add-after 'install 'glib-or-gtk-wrap
@@ -161,7 +163,18 @@ (define-public gnucash
             (lambda _
               ;; We are not updating Finance::Quote from CPAN.  There is no
               ;; reason to install this binary.
-              (delete-file (string-append #$output "/bin/gnc-fq-update")))))))
+              (delete-file (string-append #$output "/bin/gnc-fq-update"))))
+          (add-after 'glib-or-gtk-wrap 'unwrap-some
+            (lambda _
+              (for-each
+               (lambda (prog)
+                 (delete-file (string-append #$output "/bin/" prog))
+                 (rename-file (string-append #$output "/bin/." prog "-real")
+                              (string-append #$output "/bin/" prog)))
+               ;; Sadly glib-or-gtk-wrap does not allow excluding individual
+               ;; files.  Being wrapped breaks the finance-quote-wrapper (it
+               ;; is expected to be a perl script, not a shell one).
+               '("finance-quote-wrapper")))))))
     (native-inputs
      (list gmp
            `(,glib "bin")               ;glib-compile-schemas, etc.
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#75317] [PATCH 5/6] gnu: perl-finance-quote: Update to 1.64.
  2025-01-03 14:14 [bug#75317] [PATCH 0/6] gnu: gnucash: Fix getting quotes Tomas Volf
                   ` (3 preceding siblings ...)
  2025-01-03 14:24 ` [bug#75317] [PATCH 4/6] gnu: gnucash: Do not wrap finance-quote-wrapper Tomas Volf
@ 2025-01-03 14:24 ` Tomas Volf
  2025-01-03 14:24 ` [bug#75317] [PATCH 6/6] gnu: gnucash: Update to 5.10 Tomas Volf
  5 siblings, 0 replies; 7+ messages in thread
From: Tomas Volf @ 2025-01-03 14:24 UTC (permalink / raw)
  To: 75317; +Cc: Tomas Volf

* gnu/packages/web.scm (perl-finance-quote): Update to 1.64.

Change-Id: Ia7befbfb23a0c2de36cf32ea808b3f83c71349da
---
 gnu/packages/web.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 8f816acfd9..7f0d6701f9 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -3546,14 +3546,14 @@ (define-public perl-file-listing
 (define-public perl-finance-quote
   (package
    (name "perl-finance-quote")
-   (version "1.59")
+   (version "1.64")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/"
                           "Finance-Quote-" version ".tar.gz"))
       (sha256
-       (base32 "0a19y5bj2pvdlfi747ihgz5khjlfkhjakv712r0gz0n6miwjiscs"))))
+       (base32 "06swiq3c8cdv73nq53wshdvcxzwf2cbiay12dvjjr4as86a7r005"))))
    (build-system perl-build-system)
    (native-inputs
      (list perl-test-harness
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#75317] [PATCH 6/6] gnu: gnucash: Update to 5.10.
  2025-01-03 14:14 [bug#75317] [PATCH 0/6] gnu: gnucash: Fix getting quotes Tomas Volf
                   ` (4 preceding siblings ...)
  2025-01-03 14:24 ` [bug#75317] [PATCH 5/6] gnu: perl-finance-quote: Update to 1.64 Tomas Volf
@ 2025-01-03 14:24 ` Tomas Volf
  5 siblings, 0 replies; 7+ messages in thread
From: Tomas Volf @ 2025-01-03 14:24 UTC (permalink / raw)
  To: 75317; +Cc: Tomas Volf

* gnu/packages/gnucash.scm (gnucash): Update to 5.10.
(gnucash-docs): Update hash.

Change-Id: Ic0211b560f9326b40fcec42505fb74ecc61bf32c
---
 gnu/packages/gnucash.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 3f4967b2ef..db6a872224 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -66,14 +66,14 @@ (define-public gnucash
   ;; directory.
   (package
     (name "gnucash")
-    (version "5.9")
+    (version "5.10")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
                            version "/gnucash-" version ".tar.bz2"))
        (sha256
-        (base32 "1l1g4acangbf4r27vsvavds0yqqa8smy4s676by68r639wvfbqjv"))))
+        (base32 "14xd0w2afbyk0dzsw9f528722i3p1vhs78vr09r8cnzfk0v9z7bq"))))
     (outputs '("out" "doc" "debug" "python"))
     (build-system cmake-build-system)
     (arguments
@@ -233,7 +233,7 @@ (define gnucash-docs
                "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
                version "/gnucash-docs-" version revision ".tar.gz"))
          (sha256
-          (base32 "1jclya8p005dfwhkx4yqbcml631y4xngl8v08kg33d0ws4mkmi4v"))))
+          (base32 "0hx8gd5xbypbgw1hfnjiyxhkjxpid1qpmvihwlpb803lx9v8jkk0"))))
       (build-system cmake-build-system)
       ;; These are native-inputs because they are only required for building the
       ;; documentation.
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-01-03 14:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03 14:14 [bug#75317] [PATCH 0/6] gnu: gnucash: Fix getting quotes Tomas Volf
2025-01-03 14:24 ` [bug#75317] [PATCH 1/6] gnu: gnucash: Fix locating perl binary Tomas Volf
2025-01-03 14:24 ` [bug#75317] [PATCH 2/6] gnu: gnucash: Do not install gnc-fq-update Tomas Volf
2025-01-03 14:24 ` [bug#75317] [PATCH 3/6] gnu: gnucash: Drop special case for gnc-fq-helper Tomas Volf
2025-01-03 14:24 ` [bug#75317] [PATCH 4/6] gnu: gnucash: Do not wrap finance-quote-wrapper Tomas Volf
2025-01-03 14:24 ` [bug#75317] [PATCH 5/6] gnu: perl-finance-quote: Update to 1.64 Tomas Volf
2025-01-03 14:24 ` [bug#75317] [PATCH 6/6] gnu: gnucash: Update to 5.10 Tomas Volf

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.