all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: EuAndreh via Guix-patches via <guix-patches@gnu.org>
To: 45043@debbugs.gnu.org
Cc: EuAndreh <eu@euandre.org>
Subject: [bug#45043] [PATCH] gnu: git-open: Remove unnecessary propagated input.
Date: Fri,  4 Dec 2020 17:53:32 -0300	[thread overview]
Message-ID: <20201204205332.28505-1-eu@euandre.org> (raw)

* gnu/packages/version-control.scm (git-open): Stop propagating xdg-utils
package, and replace the runtime dependency by wrapping xdg-utils in the
derivation.  Also use copy-build-system instead of trivial-build-system.
---
 gnu/packages/version-control.scm | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index a8e6d2c4b9..eec57b3b6d 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -55,6 +55,7 @@
   #:use-module (guix git-download)
   #:use-module (guix hg-download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system perl)
@@ -2733,20 +2734,20 @@ file contents on a remote server.")
        (file-name (git-file-name name version))
        (sha256
         (base32 "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0"))))
-    (build-system trivial-build-system)
-    (propagated-inputs
+    (build-system copy-build-system)
+    (inputs
      `(("xdg-utils" ,xdg-utils)))
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((source (assoc-ref %build-inputs "source"))
-               (out    (assoc-ref %outputs "out")))
-           (mkdir-p (string-append out "/bin"))
-           (copy-file (string-append source "/git-open")
-                      (string-append out "/bin/git-open"))
-           #t))))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-program
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (xdg-utils (assoc-ref inputs "xdg-utils")))
+               (wrap-program (string-append out "/bin/git-open")
+                 `("PATH" ":" prefix (,(string-append xdg-utils "/bin"))))))))
+       #:install-plan
+       '(("git-open" "bin/git-open"))))
     (home-page "https://github.com/paulirish/git-open")
     (synopsis "Open a Git repository's homepage from the command-line")
     (description
-- 
2.29.2





             reply	other threads:[~2020-12-04 21:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 20:53 EuAndreh via Guix-patches via [this message]
2020-12-05  4:42 ` [bug#45043] [PATCH] gnu: git-open: Remove unnecessary propagated input Leo Famulari
2020-12-05 11:19   ` EuAndreh via Guix-patches via

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

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

  git send-email \
    --in-reply-to=20201204205332.28505-1-eu@euandre.org \
    --to=guix-patches@gnu.org \
    --cc=45043@debbugs.gnu.org \
    --cc=eu@euandre.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 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.