| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 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 |
| 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
|
| 98 | plethora 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
|
| 105 | The archive formats below are also supported as long as the corresponding
|
| 106 | compressor 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+)))
|