Subject: Re: [bug#53825] [PATCH] gnu: Add sbase.

From: Xinglu Chen <[email-masked]>
Date: Sun, 06 Feb 2022 19:24:35 +0100

jgart via schrieb am Sonntag der 06. Februar 2022 um 12:56 -05:

> * gnu/packages/suckless.scm (sbase): New variable.
> ---
>  gnu/packages/suckless.scm | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>
> diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
> index 708eb2c338..af7c0a8801 100644
> --- a/gnu/packages/suckless.scm
> +++ b/gnu/packages/suckless.scm
> @@ -988,6 +988,38 @@ (define-public snooze
>  running a command.")
>      (license license:cc0)))
>  
> +(define-public sbase
> +  (let ((commit "2c2a7f54ab55a022a617e510b6e00c3e2736fabd")
> +        (revision "0"))

What’s the reason for using a specific commit instead of a tag?  There
should be a comment about this.

> +    (package
> +      (name "sbase")
> +      (version (git-version "0" revision commit))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri
> +          (git-reference
> +           (url "https://github.com/dylanaraps/sbase")

The homepage points to <https://git.suckless.org/sbase/>.  This Github
repo seems to be private or deleted.  Guix wasn’t able to clone it.

--8<---------------cut here---------------start------------->8---
fatal: could not read Username for 'https://github.com': No such device or address
Failed to do a shallow fetch; retrying a full fetch...
fatal: could not read Username for 'https://github.com': No such device or address
git-fetch: '/gnu/store/avdv1l8zyfnjm8z5f9c4y5fgncqb03zc-git-minimal-2.34.0/bin/git fetch origin' failed with exit code 128
--8<---------------cut here---------------end--------------->8---

> +           (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32 "119v1lpgsx8bx9h57wg454ddhzz2awqavl3wrn35a704vifg28g0"))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       `(#:tests? #f ; There are no tests.
> +         #:make-flags
> +         (list (string-append "CC=" ,(cc-for-target))
> +               (string-append "PREFIX=" %output))

Use gexps instead (untested)

  ,#~(list (string-append "CC=" #$(cc-for-target))
           (string-append "PREFIX=" #$output))
        
> +         #:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure))))
> +      (home-page "https://core.suckless.org/sbase/")
> +      (synopsis "Collection of unix tools that are portable across unix-systems")

Capitalize “unix”.

> +      (description
> +  "@command{sbase} is a collection of unix tools that are portable across
> +  unix-systems.")

Likewise

> +      (license license:expat))))

LICENSE says MIT/X Consortium[1], so it should be ‘license:x11’

[1]: <https://en.wikipedia.org/wiki/MIT_License#Minor_ambiguity_and_variants>