Subject: Re: bug#72925: Adding JPM package for Janet

From: Ludovic Courtès <[email-masked]>
Date: Sat, 12 Oct 2024 19:18:38 +0200

Hi,

Suhail Singh <[email-masked]> skribis:

> * gnu/packages/lisp.scm (jpm): New variable.
>
> Change-Id: I9f5ab89a38622689b5d3545abe5d87906dc61f3b
> Signed-off-by: Suhail <[email-masked]>

There’s already been a lot of work and many versions, so I feel bad
asking for more changes, but here I am…

> +    (arguments
> +     (list
> +      #:phases #~(modify-phases %standard-phases
> +                   (add-after 'unpack 'fix-paths
> +                     (lambda* (#:key inputs #:allow-other-keys)
> +                       (substitute* "configs/linux_config.janet"
> +                         (("/usr/local")
> +                          #$output)
> +                         (("\"cc\"")
> +                          (string-append "\""
> +                                         #$gcc "/bin/gcc" "\""))
> +                         (("\"c\\+\\+\"")
> +                          (string-append "\""
> +                                         #$gcc "/bin/g++" "\""))
> +                         (("\"git\"")
> +                          (string-append "\""
> +                                         #$git "/bin/git" "\""))
> +                         (("\"curl\"")
> +                          (string-append "\""
> +                                         #$curl "/bin/curl" "\"")))
> +                       (substitute* "jpm/shutil.janet"
> +                         (("cp")
> +                          (string-append #$coreutils "/bin/cp")))

Please add ‘git-minimal/pinned’, ‘curl’, and ‘coreutils-minimal’ to the
‘inputs’ field.  Then you can fix the stanzas above to things like:

  (string-append "\"" (search-input-file inputs "/bin/curl") "\"")

Likewise for GCC, but see next message.

Ludo’.