unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: edk@beaver-labs.com
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 41949@debbugs.gnu.org
Subject: [bug#41949] [PATCH 3/5] guix: Add gerbil-build-system
Date: Mon, 07 Sep 2020 17:54:51 +0200	[thread overview]
Message-ID: <87tuw9zino.fsf@rdklein.fr> (raw)
In-Reply-To: <87tuwg43la.fsf@gnu.org>


Ludovic Courtès writes:

> Edouard Klein <edk@beaver-labs.com> skribis:
>
>> * guix/build-system/gerbil.scm: New file.
>> (%gerbil-build-system-modules): New variable.
>> (gerbil-build): New variable
>> (gerbil-build-system): New variable
>>
>> * guix/build/gerbil-build-system.scm: New file.
>> (%standard-phases): New variable.
>> (gerbil-build): New variable.
>
> [...]
>
>> +;; Gerbil's build system and package management is documented at
>> +;; https://cons.io/guide/package-manager.html
>> +;; https://cons.io/guide/build.html
>> +;; https://cons.io/guide/env-vars.html
>> +;;
>> +;; The compiler is writing its output in the directory
>> +;; pointed to by GERBIL_PATH (or ~/.gerbil by default).
>> +;;
>> +;; Every package is supposed to have a build.ss script
>> +;; whose default action (when called with no argument)
>> +;; is to compile the package.
>> +;;
>> +;; The GERBIL_LOADPATH env variable tells gerbil's runtime
>> +;; where it can find its loadable code.
>> +;;
>> +;; GERBIL_HOME tells gerbil where to find its runtime
>> +;; and standard library
>> +;;
>> +;; This build system therefore just
>> +;; - makes GERBIL_PATH point to the output directory in the store,
>> +;; - makes GERBIL_LOADPATH point to the lib subdir
>> +;; of all the gerbil inputs,
>> +;; - calls ./build.ss,
>> +;; - wrap any executable with GERBIL_LOADPATH set the the lib
>> +;; subdir of all the gerbil inputs plus the lib subdir
>> +;; of the current package's output, and with GERBIL_HOME
>> +;; set to the lib directory of the 'gerbil' input
>> +
>> +(define (loadpath inputs)
>> +  (string-join (map (match-lambda
>> +                      ((_ . path)
>> +                       (string-append path "/lib")))
>> +                    ;; Restrict to inputs beginning with "gerbil-".
>> +                    (filter (match-lambda
>> +                              ((name . _)
>> +                               (string-prefix? "gerbil-" name)))
>> +                            inputs))
>> +               ":"))
>
> Shouldn’t ‘GERBIL_LOADPATH’ be in ‘native-search-paths’ of Gerbil, just
> like ‘GUILE_LOAD_PATH’ for Guile?
>
> In that case, you wouldn’t need this procedure.  Perhaps, you’d need to
> adjust the convention, though, so that libraries are installed to
> lib/gerbil/ instead of lib/gerbil-* (not strictly necessary because the
> search path mechanism accepts regexps, as used for XML_CATALOG_FILES,
> but somewhat “nicer” IMO).
>
> Thoughts?

I saw native-search-paths in the sources but did not understand its use
and instead copied the python and golang build systems with which I was
more familiar. What you're proposing sounds better than what I've done.

>
> We’d also need an item in doc/guix.texi under “Build Systems”.

Of course.

>
> Please let us know if you cannot work on it in the foreseeable future.
> I might be able to make these changes if they make sense to you.

I'd like to try, but it may take a while :)

>
> Thanks,
> Ludo’.

Thank you for reviewing the patches :) I'll send an update ASAP, maybe
around october.

Cheers,






  reply	other threads:[~2020-09-07 16:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 13:14 [bug#41949] Adding the Gerbil scheme language, build system and two packages Edouard Klein
2020-06-19 13:35 ` [bug#41949] [PATCH 1/5] gnu: Add gerbil Edouard Klein
2020-09-02 15:04   ` Ludovic Courtès
2020-06-19 13:36 ` [bug#41949] [PATCH 2/5] gnu: Add xlsxio Edouard Klein
2020-09-02 15:04   ` Ludovic Courtès
2020-06-19 13:36 ` [bug#41949] [PATCH 3/5] guix: Add gerbil-build-system Edouard Klein
2020-09-02 15:10   ` Ludovic Courtès
2020-09-07 15:54     ` edk [this message]
2020-06-19 13:36 ` [bug#41949] [PATCH 4/5] gnu: Add gerbil-srfi-54 Edouard Klein
2020-06-19 13:37 ` [bug#41949] [PATCH 5/5] gnu: Add gerbil-denatting Edouard Klein
     [not found] ` <handler.41949.B.159257250323165.ack@debbugs.gnu.org>
2020-07-24 18:09   ` [bug#41949] Acknowledgement (Adding the Gerbil scheme language, build system and two packages) edk
2020-09-02 15:03     ` Ludovic Courtès
2020-09-07 15:49       ` edk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuw9zino.fsf@rdklein.fr \
    --to=edk@beaver-labs.com \
    --cc=41949@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).