[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/31: gnu: diffoscope: Use G-expressions.
From: |
guix-commits |
Subject: |
12/31: gnu: diffoscope: Use G-expressions. |
Date: |
Mon, 17 Jul 2023 11:37:21 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit aeb6cdacbc3e245c515cd2c1dde869c462754687
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Jul 9 02:00:01 2023 +0200
gnu: diffoscope: Use G-expressions.
* gnu/packages/diffoscope.scm (diffoscope)[arguments]:
Rewrite as G-expressions.
---
gnu/packages/diffoscope.scm | 108 ++++++++++++++++++++++----------------------
1 file changed, 55 insertions(+), 53 deletions(-)
diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm
index 4d3908cdf3..61bd23f3e2 100644
--- a/gnu/packages/diffoscope.scm
+++ b/gnu/packages/diffoscope.scm
@@ -86,59 +86,61 @@
(base32 "16v6p970kckyv5pa93sj7r5k4b0hgbyralvzddbj73g7srysa02v"))))
(build-system python-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
- ;; These tests are broken because our `file` package has a
- ;; bug in berkeley-db and wasm file type detection.
- (add-after 'unpack 'remove-broken-file-type-detection-test
- (lambda _
- (delete-file "tests/comparators/test_berkeley_db.py")
- (delete-file "tests/comparators/test_wasm.py")))
- (add-after 'unpack 'embed-tool-references
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "diffoscope/comparators/utils/compare.py"
- (("\\[\"xxd\",")
- (string-append "[\"" (which "xxd") "\",")))
- (substitute* "diffoscope/diff.py"
- (("@tool_required\\(\"diff\"\\)") "")
- (("get_tool_name\\(\"diff\"\\)")
- (string-append "get_tool_name(\"" (which "diff")
"\")")))
- (substitute* "diffoscope/comparators/directory.py"
- (("@tool_required\\(\"stat\"\\)") "")
- (("@tool_required\\(\"getfacl\"\\)") "")
- (("\\[\"stat\",")
- (string-append "[\"" (which "stat") "\","))
- (("\\[\"getfacl\",")
- (string-append "[\"" (which "getfacl") "\",")))))
- (add-after 'build 'build-man-page
- (lambda _
- (invoke "make" "-C" "doc")))
- (add-before 'check 'writable-test-data
- (lambda _
- ;; Tests may need write access to tests directory.
- (for-each make-file-writable (find-files "tests"))))
- (add-before 'check 'fix-failing-test
- (lambda _
- ;; There is no user name mapping in the build
environment.
- ;; Pytest made it so much harder than should be
necessary,
- ;; so I'm leaving… this here in case I ever need it
again:
- ;; (substitute* "tests/comparators/test_squashfs.py"
- ;; (("^def test_symlink_root.*" match) ; no, I
don't
- ;; (string-append ; know
Python
- ;; match "\n raise ValueError(" ; why do you
- ;; "differences_root[1].unified_diff)\n"))) ; ask
- (substitute* "tests/data/squashfs_root_expected_diff"
- (("root/root")
- '"0/0 "))))
- (add-before 'check 'delete-failing-test
- ;; Please add new tests to fix-failing-test and not here
;-)
- (lambda _
- ;; This requires /sbin to be in $PATH.
- (delete-file "tests/test_tools.py")))
- (add-after 'install 'install-man-page
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (man (string-append out "/share/man/man1")))
- (install-file "doc/diffoscope.1" man)))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; These tests are broken because our `file` package has a
+ ;; bug in berkeley-db and wasm file type detection.
+ (add-after 'unpack 'remove-broken-file-type-detection-test
+ (lambda _
+ (delete-file "tests/comparators/test_berkeley_db.py")
+ (delete-file "tests/comparators/test_wasm.py")))
+ (add-after 'unpack 'embed-tool-references
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "diffoscope/comparators/utils/compare.py"
+ (("\\[\"xxd\",")
+ (string-append "[\"" (which "xxd") "\",")))
+ (substitute* "diffoscope/diff.py"
+ (("@tool_required\\(\"diff\"\\)") "")
+ (("get_tool_name\\(\"diff\"\\)")
+ (string-append "get_tool_name(\"" (which "diff") "\")")))
+ (substitute* "diffoscope/comparators/directory.py"
+ (("@tool_required\\(\"stat\"\\)") "")
+ (("@tool_required\\(\"getfacl\"\\)") "")
+ (("\\[\"stat\",")
+ (string-append "[\"" (which "stat") "\","))
+ (("\\[\"getfacl\",")
+ (string-append "[\"" (which "getfacl") "\",")))))
+ (add-after 'build 'build-man-page
+ (lambda _
+ (invoke "make" "-C" "doc")))
+ (add-before 'check 'writable-test-data
+ (lambda _
+ ;; Tests may need write access to tests directory.
+ (for-each make-file-writable (find-files "tests"))))
+ (add-before 'check 'fix-failing-test
+ (lambda _
+ ;; There is no user name mapping in the build environment.
+ ;; Pytest made it so much harder than should be necessary,
+ ;; so I'm leaving… this here in case I ever need it again:
+ ;; (substitute* "tests/comparators/test_squashfs.py"
+ ;; (("^def test_symlink_root.*" match) ; no, I don't
+ ;; (string-append ; know Python
+ ;; match "\n raise ValueError(" ; why do you
+ ;; "differences_root[1].unified_diff)\n"))) ; ask
+ (substitute* "tests/data/squashfs_root_expected_diff"
+ (("root/root")
+ '"0/0 "))))
+ (add-before 'check 'delete-failing-test
+ ;; Please add new tests to fix-failing-test and not here ;-)
+ (lambda _
+ ;; This requires /sbin to be in $PATH.
+ (delete-file "tests/test_tools.py")))
+ (add-after 'install 'install-man-page
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (man (string-append out "/share/man/man1")))
+ (install-file "doc/diffoscope.1" man)))))))
(inputs (list rpm ;for rpm-python
python-debian
python-libarchive-c
- 14/31: gnu: ddcutil: Update to 1.4.2., (continued)
- 14/31: gnu: ddcutil: Update to 1.4.2., guix-commits, 2023/07/17
- 15/31: gnu: unbound: Update to 1.17.1., guix-commits, 2023/07/17
- 18/31: gnu: zutils: Update to 1.12., guix-commits, 2023/07/17
- 22/31: gnu: epson-inkjet-printer-escpr: Document missing newer tarballs., guix-commits, 2023/07/17
- 24/31: gnu: zchunk: Use G-expressions., guix-commits, 2023/07/17
- 01/31: gnu: trurl: Update to 0.8., guix-commits, 2023/07/17
- 03/31: gnu: redis: Fetch over HTTPS., guix-commits, 2023/07/17
- 07/31: gnu: virtuoso-ose: Update to 7.2.10., guix-commits, 2023/07/17
- 10/31: gnu: sdcv: Update to 0.5.5., guix-commits, 2023/07/17
- 11/31: gnu: diffoscope: Update to 244., guix-commits, 2023/07/17
- 12/31: gnu: diffoscope: Use G-expressions.,
guix-commits <=
- 26/31: gnu: stress: Update to 1.0.7., guix-commits, 2023/07/17
- 27/31: gnu: jc: Update to 1.23.3., guix-commits, 2023/07/17
- 05/31: gnu: vdirsyncer: Update to 0.19.2., guix-commits, 2023/07/17
- 17/31: gnu: libisofs: Update to 1.5.6.pl01., guix-commits, 2023/07/17
- 31/31: gnu: thermald: Update to 2.5.3., guix-commits, 2023/07/17
- 19/31: gnu: zutils: Use G-expressions., guix-commits, 2023/07/17
- 02/31: gnu: trurl: Improve description., guix-commits, 2023/07/17
- 13/31: gnu: diffoscope: Don't embed build-time references., guix-commits, 2023/07/17
- 21/31: gnu: hplip: Update to 3.23.5., guix-commits, 2023/07/17
- 20/31: gnu: xarchiver: Update to 0.5.4.21., guix-commits, 2023/07/17