[PATCH] gnu: packages: Add miniz.

  • Open
  • quality assurance status badge
Details
3 participants
  • Liliana Marie Prikler
  • Tobias Geerinckx-Rice
  • (
Owner
unassigned
Submitted by
(
Severity
normal
(
(address . guix-patches@gnu.org)(name . ()(address . paren@disroot.org)
20220807120201.19970-1-paren@disroot.org
* gnu/packages/compression.scm (miniz): New variable.
---
gnu/packages/compression.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (49 lines)
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 <zimon.toutoune@gmail.com>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Ahmad Jarara <git@ajarara.io>
+;;; Copyright © 2022 ( <paren@disroot.org>
;;;
;;; 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.
+ (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))
+ (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.")
+ (license license:expat))))
--
2.37.1
L
L
Liliana Marie Prikler wrote on 7 Aug 2022 18:42
1c8bc45b27083d351e3930006c51675e00d3d15b.camel@gmail.com
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 (:
Toggle quote (27 lines)
> * 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 <zimon.toutoune@gmail.com>
>  ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
>  ;;; Copyright © 2021 Ahmad Jarara <git@ajarara.io>
> +;;; Copyright © 2022 ( <paren@disroot.org>
>  ;;;
>  ;;; 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.
Toggle quote (21 lines)
> +  (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.
Toggle quote (8 lines)
> +     (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 :)
(
CLZYG7KIE2H0.UDOUWFLA6TNV@guix-aspire
On Sun Aug 7, 2022 at 5:42 PM BST, Liliana Marie Prikler wrote:
Toggle quote (2 lines)
> last time I checked, the template was "gnu: Add PACKAGE", not "gnu:
> packages: Add PACKAGE."
Okay, I'll remember that for next time :)

Toggle quote (26 lines)
> 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.
It doesn't work; I tried it.

Toggle quote (6 lines)
> > +      "@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 :)
Do 'small' and 'simple' count as marketing terms? 'smaller than zlib'
is objective fact, and 'simpler than zlib' is subjective but pretty
obvious. Maybe I could rewrite it to say 'smaller, simpler alternative'
instead?

-- (
(
CLZYI303KYEC.1D0DOUP2QUQMN@guix-aspire
On Sun Aug 7, 2022 at 5:42 PM BST, Liliana Marie Prikler wrote:
Toggle quote (3 lines)
> 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.
Okay, I'll update it to use the latest release.

-- (
L
L
Liliana Marie Prikler wrote on 7 Aug 2022 19:19
5a29460b4974deaaadd1798b9217dad0fae99151.camel@gmail.com
Am Sonntag, dem 07.08.2022 um 17:59 +0100 schrieb (:
Toggle quote (46 lines)
> On Sun Aug 7, 2022 at 5:42 PM BST, Liliana Marie Prikler wrote:
> > last time I checked, the template was "gnu: Add PACKAGE", not "gnu:
> > packages: Add PACKAGE."
> Okay, I'll remember that for next time :)
>
> > 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.
> It doesn't work; I tried it.
>
> > > +      "@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 :)
> Do 'small' and 'simple' count as marketing terms? 'smaller than zlib'
> is objective fact, and 'simpler than zlib' is subjective but pretty
> obvious. Maybe I could rewrite it to say 'smaller, simpler
> alternative'
> instead?
"subjective, but pretty obvious", how so? I think the fact that it
doesn't have its own documentation and you need to instead refer to
zlib kinda defeats that point. Several of its README claims seem
either outdated already (the 550 lines one for example), or difficult
to guarantee forever. I think the only claim we can reasonably make is
that it is an alternative zlib implementation, and that it supports
zlib, deflate, png and zip.

Cheers
(
CLZYXXJLC2MU.1ZCQ2VJ7JF9PD@guix-aspire
On Sun Aug 7, 2022 at 6:19 PM BST, Liliana Marie Prikler wrote:
Toggle quote (7 lines)
> "subjective, but pretty obvious", how so? I think the fact that it
> doesn't have its own documentation and you need to instead refer to
> zlib kinda defeats that point. Several of its README claims seem
> either outdated already (the 550 lines one for example), or difficult
> to guarantee forever. I think the only claim we can reasonably make is
> that it is an alternative zlib implementation, and that it supports
> zlib, deflate, png and zip.
Okay. (There is a little documentation in the headers, by the way.) :)

-- (
T
T
Tobias Geerinckx-Rice wrote on 8 Aug 2022 02:36
Re: [bug#57034] [PATCH] gnu: packages: Add miniz.
A8156A98-CB22-4AAB-A4CC-A8BCE9F6239E@tobias.gr
On 7 August 2022 16:42:35 UTC, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote:
Toggle quote (8 lines)
>> +     (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 :)
(Small and simple are marketing terms? Be right back; I need to update my profile...)

...no: avoid misleading or meaningless drivel, puffery, and redundancy. Do, however, point out some basic features that might help users decide which of our oofteen deflate libraries fits their needs. Add -er if you think it helps, or add some examples.

Otherwise, a common-sense guideline risks devolving into 'avoid adjectives; you might accidentally write a useful description'.



Kind regards,

T G-R

Sent on the go. Excuse or enjoy my brevity.
L
L
Liliana Marie Prikler wrote on 8 Aug 2022 06:29
8c2e7c4be682d3b197cb1e1d99eef3345b15084b.camel@gmail.com
Am Montag, dem 08.08.2022 um 00:36 +0000 schrieb Tobias Geerinckx-Rice:
Toggle quote (19 lines)
> On 7 August 2022 16:42:35 UTC, Liliana Marie Prikler
> <liliana.prikler@gmail.com> wrote:
> > > +     (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 :)
>  
> (Small and simple are marketing terms?  Be right back; I need to
> update my profile...)
>
> ...no: avoid misleading or meaningless drivel, puffery, and
> redundancy.  Do, however, point out some basic features that might
> help users decide which of our oofteen deflate libraries fits their
> needs.  Add -er if you think it helps, or add some examples.
Maybe not always, but I think in this context they are. Especially
"simple", who decides that? Pardon my cynicism here, but my personal
opinion w.r.t. compression libraries is that projects tend to pick the
one they're already contractually obligated to use FSVO contractually
obligated.
(
[PATCH v2] gnu: packages: Add miniz.
(address . 57034@debbugs.gnu.org)(name . ()(address . paren@disroot.org)
20221212224504.21905-1-paren@disroot.org
* gnu/packages/compression.scm (miniz): New variable.
---
gnu/packages/compression.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index d2a1ed36f7..aa6404d1a3 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -36,6 +36,7 @@
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Ahmad Jarara <git@ajarara.io>
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2022 ( <paren@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2820,3 +2821,30 @@ (define-public fcrackzip
(synopsis "Zip password cracker")
(description "Fcrackzip is a Zip file password cracker.")
(license license:gpl2+)))
+
+(define-public miniz
+ (package
+ (name "miniz")
+ (version "3.0.1")
+ (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
+ "0lchj2yhvaiy0bc28xqnjqjhv4yj4kffcgxgfiikn634milwd5b4"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-DBUILD_SHARED_LIBS=ON")
+ ;; No test target.
+ #:tests? #f))
+ (home-page "https://github.com/richgel999/miniz")
+ (synopsis "Alternative to zlib")
+ (description
+ "miniz is an alternative to, and in many cases drop-in replacement for, the
+zlib data compression libraries, which provides APIs for manipulating zlib, DEFLATE,
+PNG, and ZIP files from C.")
+ (license license:expat)))

base-commit: 1d160f41f5e973ea2bbbf8bc80d216b5d9b0974c
--
2.38.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 57034@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57034
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch