From patchwork Wed Nov 16 02:49:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kiasoc5 X-Patchwork-Id: 44531 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 DAA5827BBEC; Wed, 16 Nov 2022 02:50:23 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C9C9127BBE9 for ; Wed, 16 Nov 2022 02:50:22 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ov8V5-0001WT-E8; Tue, 15 Nov 2022 21:50:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ov8V1-0001Vp-6t for guix-patches@gnu.org; Tue, 15 Nov 2022 21:50:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ov8V0-0007ER-Tp for guix-patches@gnu.org; Tue, 15 Nov 2022 21:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ov8V0-0004e6-Q8 for guix-patches@gnu.org; Tue, 15 Nov 2022 21:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59296] [PATCH 2/2] gnu: trash-cli: Use G-expressions. References: <20221116024639.31739-1-kiasoc5@disroot.org> In-Reply-To: <20221116024639.31739-1-kiasoc5@disroot.org> Resent-From: kiasoc5 Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Nov 2022 02:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59296 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59296@debbugs.gnu.org Cc: kiasoc5 Received: via spool by 59296-submit@debbugs.gnu.org id=B59296.166856699417815 (code B ref 59296); Wed, 16 Nov 2022 02:50:02 +0000 Received: (at 59296) by debbugs.gnu.org; 16 Nov 2022 02:49:54 +0000 Received: from localhost ([127.0.0.1]:55706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov8Ur-0004dH-JP for submit@debbugs.gnu.org; Tue, 15 Nov 2022 21:49:53 -0500 Received: from knopi.disroot.org ([178.21.23.139]:58852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov8Uq-0004dA-Fr for 59296@debbugs.gnu.org; Tue, 15 Nov 2022 21:49:53 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id DAE174093D; Wed, 16 Nov 2022 03:49:51 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DjFMt2e36LJb; Wed, 16 Nov 2022 03:49:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1668566990; bh=xGlEM9T69LaMQtLTAxX3f1IIgTZ8QwFJo8eKLjuyUqg=; h=From:To:Cc:Subject:Date:From; b=elOvTW0O9nlMBnT0r8QxUhNPqkHTrla3BI3jBzfd4IX+GGxtEmrQUJBlxakDQGZpT nz4cUd5fNgnXpoKXP3Nq2RnxSYZmr8bCeg5rHzU2K+t/rwndaQR5PzBSJ15zuKwar5 UBbmMPxgurDaid/vudKN4t3FcC+ooKnUKyGErKycV+b0235WX0eqfjct5F7wpjuiTZ vZPBHr2xeTQnxYkPiW2wCC3tVPH6gloXUc1+I3IvCnqYhdGyr6Rfunsx0qsobgaQ7T Bargc64B//Rcr0uwztrqBCL8vnB7zsfDioFwa11vrEpv2whnbPvZ+5FgMXLyYB3MLE tlA7dcCwQxS5Q== Date: Tue, 15 Nov 2022 21:49:04 -0500 Message-Id: <20221116024902.31966-2-kiasoc5@disroot.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: kiasoc5 X-ACL-Warn: , kiasoc5 via Guix-patches X-Patchwork-Original-From: kiasoc5 via Guix-patches via From: kiasoc5 Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/shellutils.scm (trash-cli)[arguments]: Use G-expressions. --- gnu/packages/shellutils.scm | 51 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 40f33f5227..3fd98ecba8 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -382,32 +382,31 @@ (define-public trash-cli "0hkn0hmwrag56g447ddqapib0s399a6b4a9wlliif6zmirxlww9n")))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'build 'patch-path-constants - (lambda* (#:key inputs #:allow-other-keys) - (let ((libc (assoc-ref inputs "libc")) - (coreutils (assoc-ref inputs "coreutils"))) - (substitute* "trashcli/list_mount_points.py" - (("\"/lib/libc.so.6\".*") - (string-append "\"" libc "/lib/libc.so.6\"\n")) - (("\"df\"") - (string-append "\"" coreutils "/bin/df\"")))))) - (add-before 'build 'fix-setup.py - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin"))) - (mkdir-p bin) - (substitute* "setup.py" - (("add_script\\('") - (string-append "add_script('" bin "/" )))))) - ;; Whenever setup.py is invoked, scripts in out/bin/ are - ;; replaced. Thus we cannot invoke setup.py for testing. - ;; Upstream also uses pytest. - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest"))))))) + (list #:phases + #~(modify-phases %standard-phases + (add-before 'build 'patch-path-constants + (lambda* (#:key inputs #:allow-other-keys) + (let ((libc (search-input-file inputs "lib/libc.so.6")) + (df #$(file-append coreutils "/bin/df"))) + (substitute* "trashcli/list_mount_points.py" + (("\"/lib/libc.so.6\".*") + (string-append "\"" libc "\"\n")) + (("\"df\"") + (string-append "\"" df "\"")))))) + (add-before 'build 'fix-setup.py + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append #$output "/bin"))) + (mkdir-p bin) + (substitute* "setup.py" + (("add_script\\('") + (string-append "add_script('" bin "/" )))))) + ;; Whenever setup.py is invoked, scripts in out/bin/ are + ;; replaced. Thus we cannot invoke setup.py for testing. + ;; Upstream also uses pytest. + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest"))))))) (native-inputs (list python-pytest python-parameterized