From 2e4bb89354d909b661208b3900abfeaa621a1582 Mon Sep 17 00:00:00 2001 From: Jakub Kądziołka Date: Sun, 12 Jan 2020 18:03:12 +0100 Subject: gnu: xdg-utils: Don't use propagated inputs. * gnu/packages/freedesktop.scm (xdg-utils)[propagated-inputs]: Remove. [inputs]: Add awk, coreutils, grep, inetutils, perl-file-mimeinfo and sed. [arguments]: Wrap the installed programs with the specified inputs in PATH. Signed-off-by: Marius Bakke --- gnu/packages/freedesktop.scm | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 7066685dee..ed221439b4 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2018 Stefan Stefanović ;;; Copyright © 2019 Reza Alizadeh Majd ;;; Copyright © 2019 Guillaume Le Vaillant +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,6 +48,7 @@ (define-module (gnu packages freedesktop) #: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 @@ (define-module (gnu packages freedesktop) #: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,12 +110,19 @@ (define-public xdg-utils ("libxslt" ,libxslt) ("w3m" ,w3m) ("xmlto" ,xmlto))) - (propagated-inputs - `(("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback + (inputs + `(("awk" ,gawk) + ("coreutils" ,coreutils) + ("grep" ,grep) + ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname' + ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback + ("sed" ,sed) ("xprop" ,xprop) ; for Xfce detecting ("xset" ,xset))) ; for xdg-screensaver (arguments `(#:tests? #f ; no check target + #:modules ((srfi srfi-26) + ,@%gnu-build-system-modules) #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-hardcoded-paths @@ -144,6 +154,21 @@ (define-public xdg-utils "/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") -- cgit v1.2.3