Subject: [bug#57034] [PATCH] gnu: packages: Add miniz.

From: Liliana Marie Prikler <[email-masked]>
Date: Sun, 07 Aug 2022 18:42:35 +0200

Hi (,

last time I checked, the template was "gnu: Add PACKAGE", not "gnu:
packages: Add PACKAGE."

Am Sonntag, dem 07.08.2022 um 13:02 +0100 schrieb (:
> * gnu/packages/compression.scm (miniz): New variable.
> ---
>  gnu/packages/compression.scm | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/gnu/packages/compression.scm
> b/gnu/packages/compression.scm
> index 6070c5beb1..cb1283c9a1 100644
> --- a/gnu/packages/compression.scm
> +++ b/gnu/packages/compression.scm
> @@ -35,6 +35,7 @@
>  ;;; Copyright © 2021 Simon Tournier <[email-masked]>
>  ;;; Copyright © 2021 Maxim Cournoyer <[email-masked]>
>  ;;; Copyright © 2021 Ahmad Jarara <[email-masked]>
> +;;; Copyright © 2022 ( <[email-masked]>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -2784,3 +2785,34 @@ (define-public fcrackzip
>      (synopsis "Zip password cracker")
>      (description "Fcrackzip is a Zip file password cracker.")
>      (license license:gpl2+)))
> +
> +(define-public miniz
> +  ;; Last release was on 27-06-2021; there have been many commits
> since
> +  ;; then.
And there might still be many more until a release.  I don't think
using untagged commits "just because" if the latest release is barely a
year old is a good idea.
> +  (let ((commit "be92575500f71dfb5ac7b0c5bb47b6e736c23039")
> +        (revision "0"))
> +    (package
> +     (name "miniz")
> +     (version (git-version "2.2.0" revision commit))
> +     (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/richgel999/miniz")
> +                    (commit commit)))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +               
> "0w42vagcv4b0hcf0jk7vamrcpmw62dblx9856j98msdfm3qv1xzi"))))
> +     (build-system cmake-build-system)
> +     (arguments
> +      (list #:configure-flags
> +            #~(list "-DBUILD_SHARED_LIBS=ON")
> +            ;; No test target.
> +            #:tests? #f))
There is a test script you could use.
> +     (home-page "https://github.com/richgel999/miniz")
> +     (synopsis "Simple replacement for @code{zlib}")
> +     (description
> +      "@code{miniz} is a small, simple alternative to the
> @code{zlib}
> +data compression library for manipulating zlib, DEFLATE, PNG, and
> ZIP
> +files from C.")
Avoid marketing terms :)