guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25843: [PATCH 2/2] gnu: Add pzstd.


From: ng0
Subject: bug#25843: [PATCH 2/2] gnu: Add pzstd.
Date: Thu, 23 Feb 2017 15:23:52 +0000

On 17-02-23 03:14:29, Tobias Geerinckx-Rice wrote:
> * gnu/packages/compression.scm (pzstd): New variable.
> ---
>  gnu/packages/compression.scm | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
> 
> diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
> index 9870158..a6a978d 100644
> --- a/gnu/packages/compression.scm
> +++ b/gnu/packages/compression.scm
> @@ -45,6 +45,7 @@
>    #:use-module (gnu packages autotools)
>    #:use-module (gnu packages backup)
>    #:use-module (gnu packages base)
> +  #:use-module (gnu packages check)
>    #:use-module (gnu packages perl)
>    #:use-module (gnu packages pkg-config)
>    #:use-module (gnu packages python)
> @@ -1169,3 +1170,38 @@ zlib.  In most scenarios, both compression and 
> decompression can be performed in
>  trade-off between compression ratio and speed, without affecting 
> decompression
>  speed.")
>      (license license:bsd-3)))
> +
> +(define-public pzstd
> +  (package (inherit zstd)
> +    (name "pzstd")
> +    (native-inputs
> +     `(("googletest", googletest)))
> +    (arguments
> +     ;; The top-level Makefile uses a ‘test’ target, this one a normal 
> ‘check’.

I don't understand how this is a reason for the strip-keyword-arguments,
can you explain this? Isn't providing the name for the test-target
enough to fix it?

> +     (strip-keyword-arguments
> +      '(#:test-target)
> +      (substitute-keyword-arguments (package-arguments zstd)
> +        ((#:phases phases)
> +         `(modify-phases ,phases
> +            (add-after 'unpack 'enter-subdirectory
> +              (lambda _ (chdir "contrib/pzstd")))
> +            (add-before 'check 'compile-tests
> +              (lambda* (#:key make-flags #:allow-other-keys)
> +                (zero? (apply system* "make" "tests" make-flags))))
> +            (add-after 'install 'install-documentation
> +              (lambda* (#:key outputs #:allow-other-keys)
> +                (let* ((out (assoc-ref outputs "out"))
> +                       (doc (string-append out "/share/doc/" ,name)))
> +                  (mkdir-p doc)
> +                  (install-file "README.md" doc)
> +                  #t))))))))
> +    (synopsis "Threaded implementation of the Zstandard compression 
> algorithm")
> +    (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a
> +multi-threaded implementation of the @uref{http://zstd.net/, Zstandard
> +compression algorithm}.  It is fully compatible with the original Zstandard 
> file
> +format and command-line interface, and can be used as a drop-in replacement.
> +
> +Compression is distributed over multiple processor cores to improve 
> performance,
> +as is the decompression of data compressed in this manner.  Data compressed 
> by
> +other implementations will only be split between two threads: one performing 
> the
> +actual decompression, the other input and output.")))
> -- 
> 2.9.3
> 
> 
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]