GNU bug report logs - #59296
[PATCH 0/2] Update trash-cli to 0.22.10.20.

Previous Next

Package: guix-patches;

Reported by: kiasoc5 <kiasoc5 <at> disroot.org>

Date: Wed, 16 Nov 2022 02:48:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 59296 <at> debbugs.gnu.org (full text, mbox):

From: kiasoc5 <kiasoc5 <at> disroot.org>
To: 59296 <at> debbugs.gnu.org
Cc: kiasoc5 <kiasoc5 <at> disroot.org>
Subject: [PATCH 2/2] gnu: trash-cli: Use G-expressions.
Date: Tue, 15 Nov 2022 21:49:04 -0500
* 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
-- 
2.38.1





This bug report was last modified 2 years and 185 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.