From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:60998) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqiwx-0001XI-Fn for guix-patches@gnu.org; Sun, 12 Jan 2020 14:31:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqiww-0003E6-0n for guix-patches@gnu.org; Sun, 12 Jan 2020 14:31:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52029) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iqiwv-0003Cf-Nn for guix-patches@gnu.org; Sun, 12 Jan 2020 14:31:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iqiwv-0005eZ-Hu for guix-patches@gnu.org; Sun, 12 Jan 2020 14:31:01 -0500 Subject: [bug#39102] [PATCH v2 1/2] gnu: xdg-utils: Don't use propagated inputs. Resent-Message-ID: From: Marius Bakke In-Reply-To: <20200112170312.vaivt4puflzacg4b@zdrowyportier.kadziolka.net> References: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> <20200112170312.vaivt4puflzacg4b@zdrowyportier.kadziolka.net> Date: Sun, 12 Jan 2020 20:29:59 +0100 Message-ID: <87k15wxyko.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= , 39102@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jakub K=C4=85dzio=C5=82ka 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=diff 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") --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4bc7gACgkQoqBt8qM6 VPpQPgf+JFCSunjTkSxa1urFj5CySbaYjktEI7jX/jPvmzG22MOfOXLQ0qijZ4rD KvuhTeDfGZaQ59iBGZtk3bak8qArQ8HxLEcj0CDcu3EIPqmOryaQ4H0kfw81H28o zfXZduakiW5aRhTG/H7ERlNgjE05+LVTJeYtXphTLQ2rMdi2PS8UCEKj4Y/JsQPX RehLGZbQvUHihxBFBxaiNm9YCQgaKAzlXHyUkH8WAvaUOvtkNTef0ROHKbIi+Y59 G1t0vVehD3rn/plUZP34SSvWi9svepYTZ40VFNW9g/h1+q5zTyPeGT/XYCX2D0kF 6E6MRpH2lU8L177FsNSc1htHdHLqUw== =NSj8 -----END PGP SIGNATURE----- --==-=-=--