unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tomas Volf <~@wolfsden.cz>
To: 75317@debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [bug#75317] [PATCH 4/6] gnu: gnucash: Do not wrap finance-quote-wrapper.
Date: Fri,  3 Jan 2025 15:24:29 +0100	[thread overview]
Message-ID: <b37c4c05d8df86ae94098e033249cd3ef10038a1.1735912713.git.~@wolfsden.cz> (raw)
In-Reply-To: <cover.1735912713.git.~@wolfsden.cz>

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





  parent reply	other threads:[~2025-01-03 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Tomas Volf [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='b37c4c05d8df86ae94098e033249cd3ef10038a1.1735912713.git.~@wolfsden.cz' \
    --to=~@wolfsden.cz \
    --cc=75317@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).