GNU bug report logs - #72925
Adding JPM package for Janet

Previous Next

Package: guix-patches;

Reported by: Omar Bassam <omar.bassam88 <at> gmail.com>

Date: Sun, 1 Sep 2024 09:06:01 UTC

Severity: normal

Done: jgart <jgart <at> dismail.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Suhail Singh <suhailsingh247 <at> gmail.com>
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, 72925 <at> debbugs.gnu.org, Munyoki Kilyungi <me <at> bonfacemunyoki.com>, Katherine Cox-Buday <cox.katherine.e+guix <at> gmail.com>, Guillaume Le Vaillant <glv <at> posteo.net>, jgart <jgart <at> dismail.de>
Subject: [bug#72925] Adding JPM package for Janet
Date: Sat, 12 Oct 2024 19:22:01 +0200
Suhail Singh <suhailsingh247 <at> gmail.com> skribis:

> * gnu/packages/lisp.scm (jpm): Ensure jpm respects JANET_HEADERPATH and
> JANET_LIBPATH if set by user.  Ensure gcc/g++ is able to find header files and
> compilation-related utilities.
>
> Change-Id: Ic7218dbd10e6fabddded50894b82492de8cabc88

[...]

> +                         (wrap-program (string-append #$output "/bin/jpm")
> +                           `("JANET_HEADERPATH" ":" prefix
> +                             (,(string-append #$janet "/include/janet")))
> +                           `("JANET_LIBPATH" ":" prefix
> +                             (,(string-append #$janet "/lib")))
> +                           `("C_INCLUDE_PATH" ":" prefix
> +                             (,(string-append gcc-toolchain "/include")))
> +                           `("CPLUS_INCLUDE_PATH" ":" prefix
> +                             (,(string-append gcc-toolchain "/include/c++")
> +                              ,(string-append gcc-toolchain "/include")))
> +                           `("LIBRARY_PATH" ":" prefix
> +                             (,(string-append gcc-toolchain "/lib")
> +                              ,(string-append gcc-toolchain "/lib64")))
> +                           `("PATH" ":" prefix
> +                             (,(string-append gcc-toolchain "/bin")
> +                              ,(string-append #$coreutils "/bin"))))))))))
> +    (inputs (list bash-minimal
> +                  ;; Lazily resolve the gcc-toolchain to avoid a circular
> +                  ;; dependency.
> +                  (module-ref (resolve-interface '(gnu packages commencement))
> +                              'gcc-toolchain)))

I suppose JPM shells out to GCC to compiler Janet (or C?) code, right?

I’d recommend adding ‘gcc’, ‘glibc’, ‘binutils’, and ‘ld-wrapper’ to
‘inputs’; that’d less us avoid the ‘gcc-toolchain’ dance.

Then in, the phase above, make sure to ‘search-input-file’ rather than
direct references to these variables.

How does that sound?

Alternatively, depending on how important this is for JPM, you could
also leave it up to users to install ‘gcc-toolchain’ alongside JPM when
they need it.

Thanks,
Ludo’.




This bug report was last modified 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.