projects/guix·blob java-team · refs

137 lines · 4.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2021 Maxim Cournoyer <[email protected]>
3;;; Copyright © 2024 Sharlatan Hellseher <[email protected]>
4;;; Copyright © 2024 Artyom V. Poptsov <[email protected]>
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages patool)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix download)
24 #:use-module (guix packages)
25 #:use-module (guix build-system pyproject)
26 #:use-module (guix gexp)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages backup)
29 #:use-module (gnu packages cdrom)
30 #:use-module (gnu packages check)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages cpio)
33 #:use-module (gnu packages debian)
34 #:use-module (gnu packages file)
35 #:use-module (gnu packages package-management)
36 #:use-module (gnu packages python-build)
37 #:use-module (gnu packages python-xyz)
38 #:use-module (gnu packages xiph))
39
40(define-public patool
41 (package
42 (name "patool")
43 (version "4.0.1")
44 (source
45 (origin
46 (method url-fetch)
47 (uri (pypi-uri "patool" version))
48 (sha256 (base32 "00lq140w13zr4b37j8qxfjmrfhyrx6b4gjxj0ypmnyikpqhyxxs1"))
49 (modules '((guix build utils)))
50 (snippet #~(substitute* "pyproject.toml"
51 (("requires +=.+setuptools-reproducible.+$") "")
52 (("build-backend +=.+setuptools_reproducible.+$")
53 "build-backend = \"setuptools.build_meta\"")))))
54 (build-system pyproject-build-system)
55 (native-inputs
56 (list bzip2
57 cabextract
58 cdrtools
59 clzip
60 cpio
61 dpkg
62 file
63 flac
64 lhasa
65 libarchive ;for bsdtar
66 lrzip
67 lzip
68 lzop
69 p7zip
70 pbzip2
71 pigz
72 plzip
73 python-argcomplete
74 python-pytest
75 python-setuptools
76 python-wheel
77 rpm))
78 (arguments
79 (list
80 #:phases
81 #~(modify-phases %standard-phases
82 (add-after 'install 'install-completions
83 (lambda _
84 (with-directory-excursion #$output
85 (for-each
86 ((@ (ice-9 match) match-lambda)
87 ((shell . path)
88 (mkdir-p (dirname path))
89 (with-output-to-file path
90 (lambda _ (invoke "register-python-argcomplete" "patool"
91 "-s" shell)))))
92 '(("bash" . "share/bash-completion/completions/patool")
93 ("fish" . "share/fish/vendor_completions.d/patool.fish")
94 ("zsh" . "share/zsh/site-functions/_patool")))))))))
95 (home-page "https://wummel.github.io/patool/")
96 (synopsis "Portable archive file manager")
97 (description "Patool provides a unified command line interface for a
98plethora of archivers. It supports the following archive formats natively:
99@itemize
100@item TAR (.tar, .cbt)
101@item BZIP2 (.bz2)
102@item GZIP (.gz)
103@item ZIP (zip, .jar, .cbz).
104@end itemize
105The archive formats below are also supported as long as the corresponding
106compressor or archiver commands are available:
107@itemize
108@item 7z (.7z, .cb7)
109@item ACE (.ace, .cba)
110@item ADF (.adf)
111@item ALZIP (.alz)
112@item APE (.ape)
113@item AR (.a)
114@item ARC (.arc)
115@item ARJ (.arj)
116@item CAB (.cab)
117@item COMPRESS (.Z)
118@item CPIO (.cpio)
119@item DEB (.deb)
120@item DMS (.dms)
121@item FLAC (.flac)
122@item GZIP (.gz)
123@item ISO (.iso)
124@item LRZIP (.lrz)
125@item LZH (.lha, .lzh)
126@item LZIP (.lz)
127@item LZMA (.lzma)
128@item LZOP (.lzo)
129@item RPM (.rpm)
130@item RAR (.rar, .cbr)
131@item RZIP (.rz)
132@item SHN (.shn)
133@item TAR (.tar, .cbt)
134@item XZ (.xz)
135@item ZOO (.zoo).
136@end itemize")
137 (license license:gpl3+)))