unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: 62008@debbugs.gnu.org
Cc: Simon Tournier <zimon.toutoune@gmail.com>
Subject: [bug#62008] [PATCH 1/2] gnu: disarchive: Wrap program instead of using propagated inputs..
Date: Mon,  6 Mar 2023 20:19:49 +0100	[thread overview]
Message-ID: <20230306191950.3639176-1-zimon.toutoune@gmail.com> (raw)
In-Reply-To: <20230306191814.3638619-1-zimon.toutoune@gmail.com>

* gnu/packages/backup.scm (disarchive)[arguments]: Add phase after install
to wrap program.
[inputs]: Add guile-gcrypt and guile-lzma.
[propagated-inputs]: Remove it.
---
 gnu/packages/backup.scm | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 7be0c813bb..7fe2e80d39 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2022 Feng Shu <tumashu@163.com>
+;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1230,6 +1231,35 @@ (define-public disarchive
                (base32
                 "1pql8cspsxyx8cpw3xyhirnisv6rb4vj5mxr1d7w9la72q740n8s"))))
     (build-system gnu-build-system)
+    (arguments
+     (list
+      #:modules `((ice-9 popen)
+                  ,@%gnu-build-system-modules)
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'wrap-program
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((effective
+                      (read (open-pipe* OPEN_READ
+                                        (string-append #$guile-3.0 "/bin/guile")
+                                        "-c" "(write (effective-version))")))
+                     (scm-dir (string-append "/share/guile/site/" effective))
+                     (go-dir (string-append "/lib/guile/" effective
+                                            "/site-ccache/"))
+                     (modules (list #$output
+                                    #$guile-bytestructures
+                                    #$guile-gcrypt
+                                    #$guile-lzma))
+                     (scm-path
+                      (map (lambda (module) (string-append module scm-dir))
+                           modules))
+                     (go-path
+                      (map (lambda (module) (string-append module scm-dir))
+                           modules)))
+                (wrap-program (string-append #$output "/bin/disarchive")
+                  `("PATH" ":" prefix (,(string-append #$output "/bin")))
+                  `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
+                  `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))))))))
     (native-inputs
      (list autoconf
            automake
@@ -1239,9 +1269,7 @@ (define-public disarchive
            guile-lzma
            guile-quickcheck))
     (inputs
-     (list guile-3.0 zlib))
-    (propagated-inputs
-     (list guile-gcrypt guile-lzma))
+     (list guile-3.0 guile-gcrypt guile-lzma zlib))
     (home-page "https://ngyro.com/software/disarchive.html")
     (synopsis "Software archive disassembler")
     (description "Disarchive can disassemble software archives into data
-- 
2.38.1





  reply	other threads:[~2023-03-06 19:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 19:18 [bug#62008] [PATCH 0/2] Update Disarchive to 0.5.0 Simon Tournier
2023-03-06 19:19 ` Simon Tournier [this message]
2023-03-06 19:19   ` [bug#62008] [PATCH 2/2] gnu: disarchive: Update " Simon Tournier
2023-03-07  9:51     ` [bug#62008] [PATCH 0/2] Update Disarchive " Ludovic Courtès
2023-03-07  9:49   ` Ludovic Courtès
2023-03-07 10:43     ` Simon Tournier
2023-03-10  8:17       ` Ludovic Courtès
2023-03-10 11:41         ` Simon Tournier
2023-03-10 16:44           ` Ludovic Courtès
2023-08-16 17:28             ` Simon Tournier
2023-08-18 13:56               ` Ludovic Courtès
2023-08-18 15:03                 ` Simon Tournier
2023-08-19  8:57                 ` Simon Tournier

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=20230306191950.3639176-1-zimon.toutoune@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=62008@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).