From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: 39102@debbugs.gnu.org
Subject: [bug#39102] [PATCH 1/2] gnu: xdg-utils: Don't use propagated inputs.
Date: Sun, 12 Jan 2020 16:43:53 +0100 [thread overview]
Message-ID: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> (raw)
* gnu/packages/freedesktop.scm (xdg-utils)
[propagated-inputs, inputs]: Add awk, coreutils, grep, inetutils 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.
---
gnu/packages/freedesktop.scm | 43 +++++++++++++++++++++++++++---------
1 file changed, 33 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 7066685dee..06006ed53d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
;;; Copyright © 2019 Reza Alizadeh Majd <r.majd@pantherx.org>
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -47,6 +48,7 @@
#:use-module (gnu packages acl)
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
@@ -55,6 +57,7 @@
#:use-module (gnu packages disk)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages gettext)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
@@ -107,20 +110,40 @@
("libxslt" ,libxslt)
("w3m" ,w3m)
("xmlto" ,xmlto)))
- (propagated-inputs
- `(("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
- ("xprop" ,xprop) ; for Xfce detecting
- ("xset" ,xset))) ; for xdg-screensaver
+ (inputs
+ `(("PATH:awk" ,gawk)
+ ("PATH:coreutils" ,coreutils)
+ ("PATH:grep" ,grep)
+ ("PATH:inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
+ ("PATH:perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
+ ("PATH:sed" ,sed)
+ ("PATH:xprop" ,xprop) ; for Xfce detecting
+ ("PATH:xset" ,xset))) ; for xdg-screensaver
(arguments
`(#:tests? #f ; no check target
#:phases
(modify-phases %standard-phases
- (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")))
+ (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 (lambda (package)
+ (string-append package "/bin"))
+ (cons (assoc-ref outputs "out")
+ (map cdr
+ (filter (lambda (package)
+ (string-prefix? "PATH:" (car package)))
+ inputs))))))
+ (for-each
+ (lambda (script)
+ (wrap-program script
+ `("PATH" ":" prefix ,path-ext)))
+ (find-files "."))))
#t))
(add-before 'build 'locate-catalog-files
(lambda* (#:key inputs #:allow-other-keys)
--
2.24.1
next reply other threads:[~2020-01-12 15:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-12 15:43 Jakub Kądziołka [this message]
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
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=20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net \
--to=kuba@kadziolka.net \
--cc=39102@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).