From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mCkjDA+2T1/xFQAA0tVLHw (envelope-from ) for ; Wed, 02 Sep 2020 15:11:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ECzkBw+2T1/kTQAAB5/wlQ (envelope-from ) for ; Wed, 02 Sep 2020 15:11:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AEDCC9402C8 for ; Wed, 2 Sep 2020 15:11:10 +0000 (UTC) Received: from localhost ([::1]:52636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDUPl-0000n8-Kj for larch@yhetil.org; Wed, 02 Sep 2020 11:11:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDUPe-0000mc-Iu for guix-patches@gnu.org; Wed, 02 Sep 2020 11:11:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48787) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDUPe-0008A6-AF for guix-patches@gnu.org; Wed, 02 Sep 2020 11:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kDUPe-000313-4F for guix-patches@gnu.org; Wed, 02 Sep 2020 11:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41949] [PATCH 3/5] guix: Add gerbil-build-system Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Sep 2020 15:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41949 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Edouard Klein Cc: 41949@debbugs.gnu.org Received: via spool by 41949-submit@debbugs.gnu.org id=B41949.159905942111529 (code B ref 41949); Wed, 02 Sep 2020 15:11:02 +0000 Received: (at 41949) by debbugs.gnu.org; 2 Sep 2020 15:10:21 +0000 Received: from localhost ([127.0.0.1]:60330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDUOy-0002zt-L1 for submit@debbugs.gnu.org; Wed, 02 Sep 2020 11:10:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDUOw-0002zd-OP for 41949@debbugs.gnu.org; Wed, 02 Sep 2020 11:10:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46727) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDUOr-0007qA-7c; Wed, 02 Sep 2020 11:10:13 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54458 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kDUOq-0006Mh-Jv; Wed, 02 Sep 2020 11:10:12 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <875zbn2o5i.fsf@alice.lan> <87wo4318kn.fsf@alice.lan> Date: Wed, 02 Sep 2020 17:10:09 +0200 In-Reply-To: <87wo4318kn.fsf@alice.lan> (Edouard Klein's message of "Fri, 19 Jun 2020 15:36:24 +0200") Message-ID: <87tuwg43la.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: oISVJkz+zQ56 Edouard Klein 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=E2=80=99t =E2=80=98GERBIL_LOADPATH=E2=80=99 be in =E2=80=98native-s= earch-paths=E2=80=99 of Gerbil, just like =E2=80=98GUILE_LOAD_PATH=E2=80=99 for Guile? In that case, you wouldn=E2=80=99t need this procedure. Perhaps, you=E2=80= =99d 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 =E2=80=9Cnicer=E2=80=9D IMO). Thoughts? We=E2=80=99d also need an item in doc/guix.texi under =E2=80=9CBuild System= s=E2=80=9D. 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. Thanks, Ludo=E2=80=99.