unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: "Jakub Kądziołka" <kuba@kadziolka.net>, 39102@debbugs.gnu.org
Subject: [bug#39102] [PATCH v2 1/2] gnu: xdg-utils: Don't use propagated inputs.
Date: Sun, 12 Jan 2020 20:29:59 +0100	[thread overview]
Message-ID: <87k15wxyko.fsf@devup.no> (raw)
In-Reply-To: <20200112170312.vaivt4puflzacg4b@zdrowyportier.kadziolka.net>


[-- Attachment #1.1: Type: text/plain, Size: 965 bytes --]

Jakub Kądziołka <kuba@kadziolka.net> writes:

> Sending a revision to the first patch after feedback on IRC. Changes:
>  - Remove the `string-prefix? "PATH:"' hack, list the packages
>    explicitly.
>  - Use cute to make the code easier to read.
>
> ---
> * gnu/packages/freedesktop.scm (xdg-utils)
>   [propagated-inputs, inputs]: Add awk, coreutils, grep and sed, make
>   the dependencies not propagated.
>   [arguments](patch-hardcoded-paths): Move to after 'install to make
>   wrap-program function correctly. Wrap the installed programs.

FYI: The stray '---' here made git disregard the actual commit message,
and instead only added the four lines above.  The other way around would
be perfect.  :-)

I've applied this patch, with the changes below (leaving the original
patch-hardcoded-paths phase intact, renaming the new phase accordingly;
and added a let binding for "out").

I'll address the Qt patch in a separate message.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: diff --]
[-- Type: text/x-patch, Size: 3135 bytes --]

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 9e1bf730d2..ed221439b4 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -122,29 +122,15 @@
     (arguments
      `(#:tests? #f   ; no check target
        #:modules ((srfi srfi-26)
-                  (guix build utils)
-                  (guix build gnu-build-system))
+                  ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
-         (add-after 'install 'patch-hardcoded-paths
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (with-directory-excursion (string-append (assoc-ref outputs "out")
-                                                      "/bin")
-               (substitute* "xdg-mime"
-                 (("/usr/bin/file") (which "file")))
-               (substitute* "xdg-open"
-                 (("/usr/bin/printf") (which "printf")))
-               (let ((path-ext
-                       (map (cute string-append <> "/bin")
-                            (cons (assoc-ref outputs "out")
-                                  (map (cute assoc-ref inputs <>)
-                                       '("awk" "coreutils" "grep" "inetutils"
-                                         "perl-file-mimeinfo" "sed" "xprop"
-                                         "xset"))))))
-                 (for-each
-                   (cute wrap-program <>
-                        `("PATH" ":" prefix ,path-ext))
-                   (find-files "."))))
+         (add-after 'unpack 'patch-hardcoded-paths
+           (lambda _
+             (substitute* "scripts/xdg-mime.in"
+               (("/usr/bin/file") (which "file")))
+             (substitute* "scripts/xdg-open.in"
+               (("/usr/bin/printf") (which "printf")))
              #t))
          (add-before 'build 'locate-catalog-files
            (lambda* (#:key inputs #:allow-other-keys)
@@ -168,6 +154,21 @@
                                  "/manpages/docbook.xsl man")))
                (setenv "STYLESHEET"
                        (string-append xsldoc "/html/docbook.xsl"))
+               #t)))
+         (add-after 'install 'wrap-executables
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (with-directory-excursion (string-append out "/bin")
+                 (let ((path-ext
+                        (map (cute string-append <> "/bin")
+                             (cons out
+                                   (map (cute assoc-ref inputs <>)
+                                        '("awk" "coreutils" "grep" "inetutils"
+                                          "perl-file-mimeinfo" "sed" "xprop"
+                                          "xset"))))))
+                   (for-each (cute wrap-program <>
+                                   `("PATH" ":" prefix ,path-ext))
+                             (find-files "."))))
                #t))))))
     (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
     (synopsis "Freedesktop.org scripts for desktop integration")

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2020-01-12 19:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-12 15:43 [bug#39102] [PATCH 1/2] gnu: xdg-utils: Don't use propagated inputs Jakub Kądziołka
2020-01-12 15:47 ` [bug#39102] [PATCH 2/2 staging] gnu: qtbase: Open links properly without xdg-utils in profile Jakub Kądziołka
2020-01-12 19:44   ` Marius Bakke
2020-01-13  7:53     ` Efraim Flashner
2020-01-12 17:03 ` [bug#39102] [PATCH v2 1/2] gnu: xdg-utils: Don't use propagated inputs Jakub Kądziołka
2020-01-12 19:29   ` Marius Bakke [this message]
2020-01-13 11:39 ` [bug#39102] [PATCH v2 2/2 staging] gnu: qtbase: Open links properly without xdg-utils in profile Jakub Kądziołka
2020-01-13 21:43   ` bug#39102: " Marius Bakke
     [not found]     ` <20200113215130.3afsnbsq2efiovhy@zdrowyportier.kadziolka.net>
2020-01-13 22:31       ` [bug#39102] " Marius Bakke

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=87k15wxyko.fsf@devup.no \
    --to=mbakke@fastmail.com \
    --cc=39102@debbugs.gnu.org \
    --cc=kuba@kadziolka.net \
    /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).