From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:36517) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqfQG-0000gz-8m for guix-patches@gnu.org; Sun, 12 Jan 2020 10:45:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqfQE-00018r-Rd for guix-patches@gnu.org; Sun, 12 Jan 2020 10:45:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51845) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iqfQE-00015Z-M9 for guix-patches@gnu.org; Sun, 12 Jan 2020 10:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iqfQE-00006D-A2 for guix-patches@gnu.org; Sun, 12 Jan 2020 10:45:02 -0500 Subject: [bug#39102] [PATCH 1/2] gnu: xdg-utils: Don't use propagated inputs. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:33557) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqfPK-0000Rj-SN for guix-patches@gnu.org; Sun, 12 Jan 2020 10:44:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqfPJ-0004oz-7C for guix-patches@gnu.org; Sun, 12 Jan 2020 10:44:06 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:47086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iqfPI-00044N-SQ for guix-patches@gnu.org; Sun, 12 Jan 2020 10:44:05 -0500 Date: Sun, 12 Jan 2020 16:43:53 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39102@debbugs.gnu.org * 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ć ;;; 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 @@ #: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