Subject: Re: [bug#72925] [PATCH v8] gnu: add jpm package

From: Suhail Singh <[email-masked]>
Date: Fri, 04 Oct 2024 23:28:46 -0400

Omar Bassam <[email-masked]> writes:

> +             (url "https://github.com/janet-lang/jpm.git")

The URL redirects to <https://github.com/janet-lang/jpm>.

> +                         (("\"cc\"")
> +                          (string-append "\""
> +                                         (assoc-ref inputs "gcc-toolchain")
> +                                         "/bin/gcc" "\""))

Can be simplified to:
#+begin_src diff
  +                         (("\"cc\"")
  +                          (string-append "\""
  +                                         #$gcc "/bin/gcc" "\""))
#+end_src

> +                         (("\"c++\"")

This regex doesn't match, it should be "\"c\\+\\+\"".

> +                          (string-append "\""
> +                                         (assoc-ref inputs "gcc-toolchain")
> +                                         "/bin/g++" "\""))

Can be similarly simplified.  As well for others.

> +    (inputs (list bash-minimal janet))

Since "janet" is in the propagated-inputs, it doesn't need to be
specified in inputs.

> +    (propagated-inputs (list janet
> +                             coreutils

"coreutils" is not a necessary dependency and can be removed.

> +                             git
> +                             curl
> +                             nss-certs

"curl" is not necessary either.  The combination of "git" and
"nss-certs" when propagated is sufficient

> +                             ;; Lazily resolve the gcc-toolchain to avoid
> +                             ;; a circular dependency.
> +                             (module-ref (resolve-interface '(gnu packages
> +                                                              commencement))
> +                                         'gcc-toolchain)))

Nicely done!  And this one ends up being essential (since it provides
necessary header files etc.).

> +    (description "JPM is the Janet Project Manager tool.  It is for automating
> +builds and downloading dependencies of Janet projects.")

I took some liberties with the description based on description on
<https://janet-lang.org/docs/jpm.html>.

-- 
Suhail