mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 14:16:55 -05:00
gnu: diffoscope: Remove redundant let binding.
* gnu/packages/diffoscope.scm (diffoscope): Unbind VERSION.
This commit is contained in:
parent
98a76dd8f3
commit
a0e5111eb1
1 changed files with 157 additions and 158 deletions
|
@ -70,163 +70,162 @@ (define-module (gnu packages diffoscope)
|
||||||
#:use-module (ice-9 match))
|
#:use-module (ice-9 match))
|
||||||
|
|
||||||
(define-public diffoscope
|
(define-public diffoscope
|
||||||
(let ((version "145"))
|
(package
|
||||||
(package
|
(name "diffoscope")
|
||||||
(name "diffoscope")
|
(version "145")
|
||||||
(version version)
|
(source (origin
|
||||||
(source (origin
|
(method git-fetch)
|
||||||
(method git-fetch)
|
(uri (git-reference
|
||||||
(uri (git-reference
|
(url "https://salsa.debian.org/reproducible-builds/diffoscope.git")
|
||||||
(url "https://salsa.debian.org/reproducible-builds/diffoscope.git")
|
(commit version)))
|
||||||
(commit version)))
|
(file-name (git-file-name name version))
|
||||||
(file-name (git-file-name name version))
|
(sha256
|
||||||
(sha256
|
(base32
|
||||||
(base32
|
"01n7q3q0hib4bd8gcq0yjghy5zhp0fh0bq1jxrn2ww8zyd4knmc3"))))
|
||||||
"01n7q3q0hib4bd8gcq0yjghy5zhp0fh0bq1jxrn2ww8zyd4knmc3"))))
|
(build-system python-build-system)
|
||||||
(build-system python-build-system)
|
(arguments
|
||||||
(arguments
|
`(#:phases (modify-phases %standard-phases
|
||||||
`(#:phases (modify-phases %standard-phases
|
;; setup.py mistakenly requires python-magic from PyPi, even
|
||||||
;; setup.py mistakenly requires python-magic from PyPi, even
|
;; though the Python bindings of `file` are sufficient.
|
||||||
;; though the Python bindings of `file` are sufficient.
|
;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
|
||||||
;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
|
(add-after 'unpack 'dependency-on-python-magic
|
||||||
(add-after 'unpack 'dependency-on-python-magic
|
(lambda _
|
||||||
(lambda _
|
(substitute* "setup.py"
|
||||||
(substitute* "setup.py"
|
(("'python-magic',") ""))))
|
||||||
(("'python-magic',") ""))))
|
;; Patch in support for known tools
|
||||||
;; Patch in support for known tools
|
(add-after 'unpack 'add-known-tools
|
||||||
(add-after 'unpack 'add-known-tools
|
(lambda _
|
||||||
(lambda _
|
(substitute* "diffoscope/external_tools.py"
|
||||||
(substitute* "diffoscope/external_tools.py"
|
(("'debian': 'openssl'")
|
||||||
(("'debian': 'openssl'")
|
"'debian': 'openssl', 'guix': 'openssl'"))))
|
||||||
"'debian': 'openssl', 'guix': 'openssl'"))))
|
;; This test is broken because our `file` package has a
|
||||||
;; This test is broken because our `file` package has a
|
;; bug in berkeley-db file type detection.
|
||||||
;; bug in berkeley-db file type detection.
|
(add-after 'unpack 'remove-berkeley-test
|
||||||
(add-after 'unpack 'remove-berkeley-test
|
(lambda _
|
||||||
(lambda _
|
(delete-file "tests/comparators/test_berkeley_db.py")
|
||||||
(delete-file "tests/comparators/test_berkeley_db.py")
|
#t))
|
||||||
#t))
|
;; Test is dynamically generated and may have false
|
||||||
;; Test is dynamically generated and may have false
|
;; negatives with different ocaml versions. Further
|
||||||
;; negatives with different ocaml versions. Further
|
;; background in: https://bugs.debian.org/939386
|
||||||
;; background in: https://bugs.debian.org/939386
|
(add-after 'unpack 'remove-ocaml-test
|
||||||
(add-after 'unpack 'remove-ocaml-test
|
(lambda _
|
||||||
(lambda _
|
(substitute* "tests/comparators/test_ocaml.py"
|
||||||
(substitute* "tests/comparators/test_ocaml.py"
|
(("def test_diff.differences.:")
|
||||||
(("def test_diff.differences.:")
|
"def skip_test_diff(differences):"))
|
||||||
"def skip_test_diff(differences):"))
|
#t))
|
||||||
#t))
|
(add-after 'unpack 'skip-elf-tests
|
||||||
(add-after 'unpack 'skip-elf-tests
|
;; FIXME: libmix_differences test added in 125, and is
|
||||||
;; FIXME: libmix_differences test added in 125, and is
|
;; failing, need to explore why...
|
||||||
;; failing, need to explore why...
|
(lambda _
|
||||||
(lambda _
|
(substitute* "tests/comparators/test_elf.py"
|
||||||
(substitute* "tests/comparators/test_elf.py"
|
(("def test_libmix_differences.libmix_differences.:")
|
||||||
(("def test_libmix_differences.libmix_differences.:")
|
"def skip_test_libmix_differences(libmix_differences):"))
|
||||||
"def skip_test_libmix_differences(libmix_differences):"))
|
#t))
|
||||||
#t))
|
(add-after 'unpack 'embed-tool-references
|
||||||
(add-after 'unpack 'embed-tool-references
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(substitute* "diffoscope/comparators/utils/compare.py"
|
||||||
(substitute* "diffoscope/comparators/utils/compare.py"
|
(("\\['xxd',")
|
||||||
(("\\['xxd',")
|
(string-append "['" (which "xxd") "',")))
|
||||||
(string-append "['" (which "xxd") "',")))
|
(substitute* "diffoscope/comparators/elf.py"
|
||||||
(substitute* "diffoscope/comparators/elf.py"
|
(("@tool_required\\('readelf'\\)") "")
|
||||||
(("@tool_required\\('readelf'\\)") "")
|
(("get_tool_name\\('readelf'\\)")
|
||||||
(("get_tool_name\\('readelf'\\)")
|
(string-append "'" (which "readelf") "'")))
|
||||||
(string-append "'" (which "readelf") "'")))
|
(substitute* "diffoscope/comparators/directory.py"
|
||||||
(substitute* "diffoscope/comparators/directory.py"
|
(("@tool_required\\('stat'\\)") "")
|
||||||
(("@tool_required\\('stat'\\)") "")
|
(("@tool_required\\('getfacl'\\)") "")
|
||||||
(("@tool_required\\('getfacl'\\)") "")
|
(("\\['stat',")
|
||||||
(("\\['stat',")
|
(string-append "['" (which "stat") "',"))
|
||||||
(string-append "['" (which "stat") "',"))
|
(("\\['getfacl',")
|
||||||
(("\\['getfacl',")
|
(string-append "['" (which "getfacl") "',")))
|
||||||
(string-append "['" (which "getfacl") "',")))
|
#t))
|
||||||
#t))
|
(add-before 'check 'writable-test-data
|
||||||
(add-before 'check 'writable-test-data
|
(lambda _
|
||||||
(lambda _
|
;; tests may need needs write access to tests
|
||||||
;; tests may need needs write access to tests
|
;; directory
|
||||||
;; directory
|
(for-each make-file-writable (find-files "tests"))
|
||||||
(for-each make-file-writable (find-files "tests"))
|
#t))
|
||||||
#t))
|
(add-before 'check 'delete-failing-test
|
||||||
(add-before 'check 'delete-failing-test
|
(lambda _
|
||||||
(lambda _
|
;; this requires /sbin to be on the path
|
||||||
;; this requires /sbin to be on the path
|
(delete-file "tests/test_tools.py")
|
||||||
(delete-file "tests/test_tools.py")
|
#t)))))
|
||||||
#t)))))
|
(inputs `(("rpm" ,rpm) ;for rpm-python
|
||||||
(inputs `(("rpm" ,rpm) ;for rpm-python
|
("python-file" ,python-file)
|
||||||
("python-file" ,python-file)
|
("python-debian" ,python-debian)
|
||||||
("python-debian" ,python-debian)
|
("python-libarchive-c" ,python-libarchive-c)
|
||||||
("python-libarchive-c" ,python-libarchive-c)
|
("python-tlsh" ,python-tlsh)
|
||||||
("python-tlsh" ,python-tlsh)
|
("acl" ,acl) ;for getfacl
|
||||||
("acl" ,acl) ;for getfacl
|
("colordiff" ,colordiff)
|
||||||
("colordiff" ,colordiff)
|
("xxd" ,xxd)))
|
||||||
("xxd" ,xxd)))
|
;; Below are modules used for tests.
|
||||||
;; Below are modules used for tests.
|
(native-inputs `(("python-pytest" ,python-pytest)
|
||||||
(native-inputs `(("python-pytest" ,python-pytest)
|
("python-chardet" ,python-chardet)
|
||||||
("python-chardet" ,python-chardet)
|
("python-binwalk" ,python-binwalk)
|
||||||
("python-binwalk" ,python-binwalk)
|
("python-h5py" ,python-h5py)
|
||||||
("python-h5py" ,python-h5py)
|
("python-pypdf2" ,python-pypdf2)
|
||||||
("python-pypdf2" ,python-pypdf2)
|
("python-progressbar33" ,python-progressbar33)
|
||||||
("python-progressbar33" ,python-progressbar33)
|
;; test suite skips tests when tool is missing
|
||||||
;; test suite skips tests when tool is missing
|
,@(match (%current-system)
|
||||||
,@(match (%current-system)
|
;; ghc is only available on x86 currently.
|
||||||
;; ghc is only available on x86 currently.
|
((or "x86_64-linux" "i686-linux")
|
||||||
((or "x86_64-linux" "i686-linux")
|
`(("ghc" ,ghc)))
|
||||||
`(("ghc" ,ghc)))
|
(_
|
||||||
(_
|
`()))
|
||||||
`()))
|
,@(match (%current-system)
|
||||||
,@(match (%current-system)
|
;; openjdk and dependent packages are only
|
||||||
;; openjdk and dependent packages are only
|
;; available on x86_64 currently.
|
||||||
;; available on x86_64 currently.
|
((or "x86_64-linux")
|
||||||
((or "x86_64-linux")
|
`(("enjarify" ,enjarify)
|
||||||
`(("enjarify" ,enjarify)
|
;; no unversioned openjdk available
|
||||||
;; no unversioned openjdk available
|
("openjdk:jdk" ,openjdk12 "jdk")
|
||||||
("openjdk:jdk" ,openjdk12 "jdk")
|
))
|
||||||
))
|
(_
|
||||||
(_
|
`()))
|
||||||
`()))
|
("abootimg" ,abootimg)
|
||||||
("abootimg" ,abootimg)
|
("bdb" ,bdb)
|
||||||
("bdb" ,bdb)
|
("binutils" ,binutils)
|
||||||
("binutils" ,binutils)
|
("bzip2" ,bzip2)
|
||||||
("bzip2" ,bzip2)
|
("cdrtools" ,cdrtools)
|
||||||
("cdrtools" ,cdrtools)
|
("colord" ,colord)
|
||||||
("colord" ,colord)
|
("cpio" ,cpio)
|
||||||
("cpio" ,cpio)
|
("docx2txt" ,docx2txt)
|
||||||
("docx2txt" ,docx2txt)
|
("dtc" ,dtc)
|
||||||
("dtc" ,dtc)
|
("e2fsprogs" ,e2fsprogs)
|
||||||
("e2fsprogs" ,e2fsprogs)
|
("ffmpeg" ,ffmpeg)
|
||||||
("ffmpeg" ,ffmpeg)
|
("gettext" ,gettext-minimal)
|
||||||
("gettext" ,gettext-minimal)
|
("ghostscript" ,ghostscript)
|
||||||
("ghostscript" ,ghostscript)
|
("giflib:bin" ,giflib "bin")
|
||||||
("giflib:bin" ,giflib "bin")
|
("gnumeric" ,gnumeric)
|
||||||
("gnumeric" ,gnumeric)
|
("gnupg" ,gnupg)
|
||||||
("gnupg" ,gnupg)
|
("hdf5" ,hdf5)
|
||||||
("hdf5" ,hdf5)
|
("imagemagick" ,imagemagick)
|
||||||
("imagemagick" ,imagemagick)
|
("libarchive" ,libarchive)
|
||||||
("libarchive" ,libarchive)
|
("llvm" ,llvm)
|
||||||
("llvm" ,llvm)
|
("lz4" ,lz4)
|
||||||
("lz4" ,lz4)
|
("mono" ,mono)
|
||||||
("mono" ,mono)
|
("ocaml" ,ocaml)
|
||||||
("ocaml" ,ocaml)
|
("odt2txt" ,odt2txt)
|
||||||
("odt2txt" ,odt2txt)
|
("openssh" ,openssh)
|
||||||
("openssh" ,openssh)
|
("openssl" ,openssl)
|
||||||
("openssl" ,openssl)
|
("pgpdump" ,pgpdump)
|
||||||
("pgpdump" ,pgpdump)
|
("poppler" ,poppler)
|
||||||
("poppler" ,poppler)
|
("python-jsbeautifier" ,python-jsbeautifier)
|
||||||
("python-jsbeautifier" ,python-jsbeautifier)
|
("r-minimal" ,r-minimal)
|
||||||
("r-minimal" ,r-minimal)
|
("rpm" ,rpm)
|
||||||
("rpm" ,rpm)
|
("sng" ,sng)
|
||||||
("sng" ,sng)
|
("sqlite" ,sqlite)
|
||||||
("sqlite" ,sqlite)
|
("squashfs-tools" ,squashfs-tools)
|
||||||
("squashfs-tools" ,squashfs-tools)
|
("tcpdump" ,tcpdump)
|
||||||
("tcpdump" ,tcpdump)
|
("unzip" ,unzip)
|
||||||
("unzip" ,unzip)
|
("wabt" ,wabt)
|
||||||
("wabt" ,wabt)
|
("xxd" ,xxd)
|
||||||
("xxd" ,xxd)
|
("xz" ,xz)
|
||||||
("xz" ,xz)
|
("zip" ,zip)
|
||||||
("zip" ,zip)
|
("zstd" ,zstd)))
|
||||||
("zstd" ,zstd)))
|
(home-page "https://diffoscope.org/")
|
||||||
(home-page "https://diffoscope.org/")
|
(synopsis "Compare files, archives, and directories in depth")
|
||||||
(synopsis "Compare files, archives, and directories in depth")
|
(description
|
||||||
(description
|
"Diffoscope tries to get to the bottom of what makes files or directories
|
||||||
"Diffoscope tries to get to the bottom of what makes files or directories
|
|
||||||
different. It recursively unpacks archives of many kinds and transforms
|
different. It recursively unpacks archives of many kinds and transforms
|
||||||
various binary formats into more human readable forms to compare them. It can
|
various binary formats into more human readable forms to compare them. It can
|
||||||
compare two tarballs, ISO images, or PDFs just as easily.
|
compare two tarballs, ISO images, or PDFs just as easily.
|
||||||
|
@ -234,7 +233,7 @@ (define-public diffoscope
|
||||||
Diffoscope has many optional dependencies; @code{diffoscope
|
Diffoscope has many optional dependencies; @code{diffoscope
|
||||||
--list-missing-tools guix} will display optional packages to
|
--list-missing-tools guix} will display optional packages to
|
||||||
install.")
|
install.")
|
||||||
(license license:gpl3+))))
|
(license license:gpl3+)))
|
||||||
|
|
||||||
(define-public reprotest
|
(define-public reprotest
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Reference in a new issue