From patchwork Sun Jan 12 19:29:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 19762 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1132E17A85; Sun, 12 Jan 2020 19:31:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id B031417A83 for ; Sun, 12 Jan 2020 19:31:18 +0000 (GMT) Received: from localhost ([::1]:41126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqixC-0001Yv-8G for patchwork@mira.cbaines.net; Sun, 12 Jan 2020 14:31:18 -0500 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 X-Loop: help-debbugs@gnu.org Subject: [bug#39102] [PATCH v2 1/2] gnu: xdg-utils: Don't use propagated inputs. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Jan 2020 19:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= , 39102@debbugs.gnu.org Received: via spool by 39102-submit@debbugs.gnu.org id=B39102.157885741821678 (code B ref 39102); Sun, 12 Jan 2020 19:31:01 +0000 Received: (at 39102) by debbugs.gnu.org; 12 Jan 2020 19:30:18 +0000 Received: from localhost ([127.0.0.1]:58000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqiw8-0005dR-JE for submit@debbugs.gnu.org; Sun, 12 Jan 2020 14:30:18 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:58169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqiw4-0005c8-6Z for 39102@debbugs.gnu.org; Sun, 12 Jan 2020 14:30:11 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C3C1521EEB; Sun, 12 Jan 2020 14:30:02 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 12 Jan 2020 14:30:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=J4YVpCu9e8Xb8D+eKna9lK9zP+ XOMEuIHp7UxPMI6fw=; b=mOv0vownMpzlwz7VEOBWxQw0QlfukzBZYT0nLfri9x LRj5MFWn7QOidi8BLHE3IKCpOHxk4jHbDwCUiTq51C/Do3OYNtgyxIXQfpNXkYCB l0fAB9C14qM0zBEZcLKWaF+2opQEeJb1rR5xajCV+u87Gp4X1NNRwwHJRMBAtYHq lEY7LReZ1FIL0jtlhhIkcnjCMJlFrBVt66+K0Wl9Y1CASROfwWauuOYMYqH8cWnG YKXs3F/oCtKidScc6KlSqiA6VbC8P1ENIlpz9WZ6kHc6LQCTSTRPVvmpf1ccLHjG KA+X2PxyaeikeJtsIr4DeimlfokvyfCIaNreYejjMXew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=J4YVpC u9e8Xb8D+eKna9lK9zP+XOMEuIHp7UxPMI6fw=; b=k8AbnB1k08NV8pK60maMFx NH7AdZnULN3SIYLKRWdbTnuRhiXKlu0kdYSA4EkcUXVLTA4tmDeYEgvTpYhc+7op rDcHlB09GeozV/VGlfBhjnJOvz0axWrUE2Z6g4sRBKBq1BK0ySK/qYACo+xTjFEy vOFVowPF5Efd20CcabsFFdtwzda7TF/o5ymUik41XNR/bQ2vQD+/pnitVqjP8vxa 08Q/pRG/QJ44XjoHMxGFKI0CoI8KpIwiZE+LRVkmz7F91KpiBidx6+ngfdc/PWob 45O2Nr02bnQwkNwXuVkEBltohffnXQRHlPWDJd0EOOm8RGwkCuCkeoPb3aboay9Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeikedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfhgffffkgggtsehgtd erredtreejnecuhfhrohhmpeforghrihhushcuuegrkhhkvgcuoehmsggrkhhkvgesfhgr shhtmhgrihhlrdgtohhmqeenucfkphepkeegrdehvddrvddviedruddtvdenucfrrghrrg hmpehmrghilhhfrhhomhepmhgsrghkkhgvsehfrghsthhmrghilhdrtghomhenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (84-52-226.102.3p.ntebredband.no [84.52.226.102]) by mail.messagingengine.com (Postfix) with ESMTPA id CC56F30607B4; Sun, 12 Jan 2020 14:30:01 -0500 (EST) From: Marius Bakke In-Reply-To: <20200112170312.vaivt4puflzacg4b@zdrowyportier.kadziolka.net> References: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> <20200112170312.vaivt4puflzacg4b@zdrowyportier.kadziolka.net> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Sun, 12 Jan 2020 20:29:59 +0100 Message-ID: <87k15wxyko.fsf@devup.no> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Jakub Kądziołka 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. 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")