diff options
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r-- | gnu/packages/compression.scm | 172 |
1 files changed, 155 insertions, 17 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 55784a70de..d35666c13f 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -39,6 +39,9 @@ ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com> ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com> ;;; Copyright © 2024 Vinicius Monego <monego@posteo.net> +;;; Copyright © 2024 David Elsing <david.elsing@posteo.net> +;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com> +;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -71,6 +74,7 @@ #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages algebra) #:use-module (gnu packages assembly) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) @@ -79,6 +83,7 @@ #:use-module (gnu packages benchmark) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages cpp) #:use-module (gnu packages curl) #:use-module (gnu packages documentation) #:use-module (gnu packages file) @@ -86,6 +91,7 @@ #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) + #:use-module (gnu packages graphics) #:use-module (gnu packages gtk) #:use-module (gnu packages java) #:use-module (gnu packages llvm) @@ -106,7 +112,7 @@ (define-public zlib (package (name "zlib") - (version "1.2.13") + (version "1.3") (source (origin (method url-fetch) @@ -116,7 +122,7 @@ version "/zlib-" version ".tar.gz"))) (sha256 (base32 - "0c5b8vw40dy178xlpddw65q9gf1h2186jcc3p4swinwggbllv8mk")))) + "0gjrz8p70mgkic7mxjh1vqwws4x8z7hq2fhbackvqg81jb1a82zz")))) (build-system gnu-build-system) (outputs '("out" "static")) (arguments @@ -251,14 +257,14 @@ adding and extracting files to/from a tar archive.") (define-public gzip (package (name "gzip") - (version "1.12") + (version "1.13") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gzip/gzip-" version ".tar.xz")) (sha256 (base32 - "0mhrx5wk9gazmxdw7vmbpg036yzqqhsww6h12kwf2dzn37jh6pnf")))) + "0mx0j7765l4cyj3hyvlks2s3izdyzaqf3hknamjwc5yv6mlynm3l")))) (build-system gnu-build-system) (synopsis "General file (de)compression (using lzw)") (arguments @@ -524,7 +530,7 @@ formats, including zstd, xz, gzip, and bgzf.") (define-public xz (package (name "xz") - (version "5.2.8") + (version "5.4.5") (source (origin (method url-fetch) (uri (list (string-append "http://tukaani.org/xz/xz-" version @@ -533,7 +539,7 @@ formats, including zstd, xz, gzip, and bgzf.") version ".tar.gz"))) (sha256 (base32 - "0z9056ydsy76ib5cl1z60jkcqgr0x12d3lw1p2qnlcwi1fgxlp7c")))) + "1mmpwl4kg1vs6n653gkaldyn43dpbjh8gpk7sk0gps5f6jwr0p0k")))) (build-system gnu-build-system) (arguments `(#:phases @@ -570,6 +576,45 @@ than gzip and 15 % smaller output than bzip2.") (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both (home-page "https://tukaani.org/xz/"))) +(define-public heatshrink + (package + (name "heatshrink") + (version "0.4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/atomicobject/heatshrink/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0sdhvk27yz8kahw18j8pddbpkgl78v8rh8fx6wspc3acj7w7yvrn")) + ;; Add CMake build script, wanted by prusa-slicer and libbgcode, which are the + ;; only users of this library (see + ;; <https://github.com/NixOS/nixpkgs/pull/269758/commits/fa36136ceed0e2c58e0c9e21492a7e60c3a64470>.) + (patches (search-patches "heatshrink-add-cmake.patch")))) + (build-system cmake-build-system) + (arguments + (list + ;; XXX: No tests available with CMake (see + ;; <https://github.com/atomicobject/heatshrink/pull/77>.) + #:tests? #f)) + (home-page "https://github.com/atomicobject/heatshrink/") + (synopsis "Data compression library for embedded/real-time systems") + (description + "A data compression/decompression library for embedded/real-time systems. + +Among its features are: +@itemize +@item Low memory usage (as low as 50 bytes.) It is useful for some cases with less +than 50 bytes, and useful for many general cases with less than 300 bytes. +@item Incremental, bounded CPU use. It can be used to chew on input data in +arbitrarily tiny bites. This is a useful property in hard real-time environments. +@item Can use either static or dynamic memory allocation. +@end itemize +") + (license license:isc))) + (define-public lhasa (package (name "lhasa") @@ -861,6 +906,47 @@ C, forked from the zip manipulation library found in the zlib distribution.") sfArk file format to the uncompressed sf2 format.") (license license:gpl3+)))) +(define-public draco + (package + (name "draco") + (version "1.5.7") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/draco") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1v1idvqr9mww9wi36yzb10lq66ls78dlrgnxchjjjv5paw2g0mk3")))) + (build-system cmake-build-system) + (arguments + ;; There is a testdata directory but apparently no actual tests. + ;; src/draco/tools/install_test contains a sanity check, but this + ;; check is useless here. + (list #:tests? #f + #:configure-flags + #~(list "-DBUILD_SHARED_LIBS=true" + (string-append "-DDRACO_EIGEN_PATH=" + #$(this-package-input "eigen")) + (string-append "-DDRACO_FILESYSTEM_PATH=" + #$(this-package-input "gulrak-filesystem")) + (string-append "-DDRACO_TINYGLTF_PATH=" + #$(this-package-input "tinygltf"))) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'delete-static-lib + (lambda _ + (delete-file (string-append #$output + "/lib/libdraco.a"))))))) + (inputs (list eigen gulrak-filesystem tinygltf)) + (home-page "https://google.github.io/draco/") + (synopsis "Compress and decompress 3D geometric meshes and point clouds") + (description "Draco is a library for compressing and decompressing 3D +geometric meshes and point clouds. It is intended to improve the storage and +transmission of 3D graphics.") + (license license:asl2.0))) + (define-public libmspack (package (name "libmspack") @@ -2150,15 +2236,18 @@ corrupted input.") (define-public plzip (package (name "plzip") - (version "1.10") + (version "1.11") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/lzip/plzip/" "plzip-" version ".tar.gz")) (sha256 - (base32 "16408n8z21hfxp0qnx3hh1d0c47g8z9i3vflbgbrmf6qcn1abyj3")))) + (base32 "0sv2sp0ppxkdds4qiwb3ddvlv22ydv61n3hk74rkh8ljbkjcpqyq")))) (build-system gnu-build-system) + (arguments + (list #:configure-flags + #~(list (string-append "CXX=" #$(cxx-for-target))))) (inputs (list lzlib)) (home-page "https://www.nongnu.org/lzip/plzip.html") @@ -2591,7 +2680,7 @@ file compression algorithm.") (define-public xarchiver (package (name "xarchiver") - (version "0.5.4.21") + (version "0.5.4.23") (source (origin (method git-fetch) @@ -2600,7 +2689,7 @@ file compression algorithm.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0m3vq1mh2vg5r7vhnwjkfhix6i2cm15z82xsi6zaqvc4zkswb2m5")))) + (base32 "0ccxp106c3r759l1bjaszz3fwlw10qzzlsd9mnmpksnlwfwjkmb8")))) (build-system glib-or-gtk-build-system) (native-inputs (list gettext-minimal intltool libxslt pkg-config)) @@ -2869,7 +2958,7 @@ compression and decompression speed compared to Deflate using Zlib.") (define-public unrar-free (package (name "unrar-free") - (version "0.1.3") + (version "0.3.1") (source (origin (method git-fetch) @@ -2878,14 +2967,14 @@ compression and decompression speed compared to Deflate using Zlib.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "12idmr5rjmw7dg2mi6250q599nywrirgc8553353a4swf5n1pmx4")))) + (base32 "1qf2fdr4bl10kys2fsb6090r9xj0ascrk7pn0iklsv1ajwcql3qf")))) (build-system gnu-build-system) - (inputs - `(("libarchive" ,libarchive))) (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("pkg-config" ,pkg-config))) + (list autoconf + automake + pkg-config)) + (inputs + (list libarchive)) (home-page "https://gitlab.com/bgermann/unrar-free") (synopsis "Extract files from RAR archives") (description @@ -2895,3 +2984,52 @@ list and extract not only RAR archives but also other formats supported by libarchive. It does not rival the non-free @code{unrar} in terms of features, but special care has been taken to ensure it meets most user's needs.") (license license:gpl2+))) + +(define-public miniz + (package + (name "miniz") + (version "3.0.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/richgel999/miniz") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0672q35vjrpakmsr1gwj9k5fwv5ihzhahm19bq4y74wqpn91p7fw")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + ''("-DBUILD_SHARED_LIBS=ON") + ;; No tests + #:tests? #f)) + (home-page "https://github.com/richgel999/miniz") + (synopsis "Independent implementation of zlib and Deflate compression") + (description "Miniz is a lossless data compression library that implements +the zlib (RFC 1950) and Deflate (RFC 1951) compressed data format +specification standards. It supports the most commonly used functions +exported by the zlib library.") + (license license:expat))) + +(define-public miniz-for-pytorch + (package + (inherit miniz) + (version "pytorch-2.2.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/richgel999/miniz") + (commit "2.2.0"))) + (file-name (git-file-name (package-name miniz) version)) + (sha256 + (base32 + "09j9ihigfsavgcmk8l36zmbjvdf1x1w7h2v4rkww1qk1sb43y5zf")) + (patches (search-patches "miniz-for-pytorch.patch")))) + (arguments + (substitute-keyword-arguments (package-arguments miniz) + ((#:configure-flags flags '()) + ;; The changes break the examples. + `(cons "-DBUILD_EXAMPLES=OFF" ,flags)))) + (properties '((hidden? . #t))))) |