Subject: Re: [bug#47930] [PATCH] gnu: Add pbgzip.

From: Xinglu Chen <[email-masked]>
Date: Wed, 21 Apr 2021 23:45:05 +0200

On Wed, Apr 21 2021, Roel Janssen wrote:

> * gnu/packages/bioinformatics.scm (pbgzip): New variable.
>
> [...]
>  
> +(define-public pbgzip
> +  (let ((commit "2b09f97b5f20b6d83c63a5c6b408d152e3982974"))
> +    (package
> +      (name "pbgzip")
> +      (version (string-take commit 7))

I think using (git-version VERSION REVISION COMMIT) is preferred.
Something like (git-version "0.0.0" "0" commit).

> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/nh13/pbgzip")
> +                      (commit commit)))
> +                (file-name (string-append name "-" version))

Use (git-file-name name version).

> +                (sha256
> +                 (base32
> +                  "1mlmq0v96irbz71bgw5zcc43g1x32zwnxx21a5p1f1ch4cikw1yd"))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       `(#:phases
> +         (modify-phases %standard-phases
> +           (add-after 'unpack 'autogen
> +             (lambda _
> +               (zero? (system* "sh" "autogen.sh")))))))

IIRC, phases don’t have to return #t, so you could remove ‘zero?’.

Builds fine, but I haven’t tested it.