Subject: Re: [PATCH v1 1/3] gnu: Add zig-clap.

From: Hilton Chain <[email-masked]>
Date: Sat, 22 Feb 2025 13:15:39 +0800

On Fri, 21 Feb 2025 03:09:10 +0800,
Ashvith Shetty wrote:
>
> From: Ashvith Shetty <[email-masked]>
>
> * gnu/packages/zig-xyz.scm (zig-clap): New variable.
>
> Change-Id: I8982047890799dfe32113f63e63dd7b6110eb8c6
> ---
>  gnu/packages/zig-xyz.scm | 42 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm
> index a76dbb0473..9b6bf09b56 100644
> --- a/gnu/packages/zig-xyz.scm
> +++ b/gnu/packages/zig-xyz.scm
> @@ -3,6 +3,7 @@
>  ;;; Copyright © 2023 Ekaitz Zarraga <[email-masked]>
>  ;;; Copyright © 2023 Felix Lechner <[email-masked]>
>  ;;; Copyright © 2024 Justin Veilleux <[email-masked]>
> +;;; Copyright © 2025 Ashvith Shetty <[email-masked]>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -301,6 +302,47 @@ (define-public zig-xkbcommon
>      (home-page "https://codeberg.org/ifreund/zig-xkbcommon")
>      (license license:expat)))
>
> +(define-public zig-clap
> +  (package
> +    (name "zig-clap")
> +    (version "0.9.1")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/Hejsil/zig-clap")
> +             (commit version)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "1xjskvyib3kai3nmp574zfm07yvjsbzsxfysj96ss9339nq07ix6"))))
> +    (build-system zig-build-system)
> +    (arguments
> +     (list
> +      #:zig zig-0.13))

zig-0.13 is the default, no need to set the argument.

> +    (home-page "https://github.com/Hejsil/zig-clap")
> +    (synopsis "Command line argument parsing library for Zig")
> +    (description
> +     "A simple and easy to use command line argument parser library for Zig.

In case you didn't get what a full sentence is: you need a subject and a predicate.

> +
> +Features include:
> +@itemize
> +@item Short arguments -a
> +@itemize
> +@item Chaining -abc where a and b does not take values.
> +@item Multiple specifications are tallied (e.g. -v -v).
> +@end itemize
> +@item Long arguments --long
> +@item Supports both passing values using spacing and = (-a 100, -a=100)
> +@itemize
> +@item Short args also support passing values with no spacing or = (-a100)
> +@item This all works with chaining (-ba 100, -ba=100, -ba100)
> +@end itemize
> +@item Supports options that can be specified multiple times (-e 1 -e 2 -e 3)
> +@item Print help message from parameter specification.
> +@item Parse help message to parameter specification.
> +@end itemize")
> +    (license license:expat)))

Please use proper texinfo markups for codes.

Also when writing synopses and descriptions, please consider yourself an end
user and explain the package to yourself first, instead of just copying upstream
documentation.  Keep in mind this is a distribution.

> +
>  (define-public zig-zls-0.10
>    (package
>      (name "zig-zls")
> --
> 2.48.1

BTW variables in zig-xyz.scm are sorted alphabetically.  When adding new
variables, please follow this rule as well.