From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 05:15:11 2024 Received: (at submit) by debbugs.gnu.org; 18 Jan 2024 10:15:11 +0000 Received: from localhost ([127.0.0.1]:54385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQPQU-0002Ti-6t for submit@debbugs.gnu.org; Thu, 18 Jan 2024 05:15:11 -0500 Received: from lists.gnu.org ([2001:470:142::17]:51124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQPQP-00025K-Kc for submit@debbugs.gnu.org; Thu, 18 Jan 2024 05:15:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQPQI-0005BD-Cd for guix-patches@gnu.org; Thu, 18 Jan 2024 05:14:58 -0500 Received: from 195-15-241-199.dc3-a.pub1.etik-cloud.com ([195.15.241.199] helo=lyrion.dc3-a.pub1.infomaniak.cloud) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQPQE-0007ac-D2 for guix-patches@gnu.org; Thu, 18 Jan 2024 05:14:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyrion.ch; s=; t=1705572886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=eztiBr6Xyp4qBsJ0HASnKn1joTSzO2yaWcCRDCSDTlw=; b=pVSrBDe4MtqnvQMXoSPydl0M7TzAEVRDwXNdhdyGWGYOW6UBkNAoL49WJbiUQ4UYt3IeaZ lxLguu23hQ1lK/ZdaUvM5ml0NPb4XRiZBmnpU8Mhhh05ZhyN+JCDoO+6Yngcpyd0m9M2K4 827a8kCZifXNe2168HLp4ZFna2hc7Ywiuw3nR/FbrB8H80hcYl/q9/w5S7yNaIt9DtUv+S Fv7g3d6CO0vriL3wOK9YmPUBa6jWUOn4NFa2qBjEIx+uGuWPmIZJ91Xn9qH8OQsvdHUEbW 2WZjc1WpvwTdBGpMMj1BqhU1OIIbg+j+XfHGzbpn9FX7bzqY/xek9uvJdylogw== Received: from localhost (dslb-002-204-231-047.002.204.pools.vodafone-ip.de [2.204.231.47]) by lyrion.dc3-a.pub1.infomaniak.cloud (OpenSMTPD) with ESMTPSA id 9e96caaf (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 18 Jan 2024 10:14:46 +0000 (UTC) Message-ID: <5f79ce0097f1092706b65abd99940d06@lyrion.ch> From: Daniel Ziltener Date: Thu, 18 Jan 2024 11:09:12 +0100 Subject: [PATCH] build-system: fix the Chicken build system To: guix-patches@gnu.org Received-SPF: pass client-ip=195.15.241.199; envelope-from=dziltener@lyrion.ch; helo=lyrion.dc3-a.pub1.infomaniak.cloud X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, PP_MIME_FAKE_ASCII_TEXT=0.001, RCVD_IN_SBL_CSS=3.335, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_CSS_A=0.1 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 4.7 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: --- guix/build-system/chicken.scm | 68 +++++++++++++++++++ guix/build/chicken-build-system.scm | 17 +++----- 2 files changed, 50 insertions(+), 35 deletions(-) diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..8c6b1f5e75 100644 --- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -2,6 +2,7 @@ ; [...] Content analysis details: (4.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [195.15.241.199 listed in zen.spamhaus.org] 0.1 URIBL_CSS_A Contains URL's A record listed in the Spamhaus CSS blocklist [URIs: lyrion.ch] 0.1 URIBL_CSS Contains an URL's NS IP listed in the Spamhaus CSS blocklist [URIs: lyrion.ch] 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=dziltener%40lyrion.ch; ip=2001%3A470%3A142%3A%3A17; r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 PP_MIME_FAKE_ASCII_TEXT BODY: MIME text/plain claims to be ASCII but isn't -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: submit Cc: dziltener@lyrion.ch X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: --- guix/build-system/chicken.scm | 68 +++++++++++++++++++ guix/build/chicken-build-system.scm | 17 +++----- 2 files changed, 50 insertions(+), 35 deletions(-) diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..8c6b1f5e75 100644 --- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -2,6 +2,7 @@ ; [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [195.15.241.199 listed in zen.spamhaus.org] 0.1 URIBL_CSS_A Contains URL's A record listed in the Spamhaus CSS blocklist [URIs: lyrion.ch] 0.1 URIBL_CSS Contains an URL's NS IP listed in the Spamhaus CSS blocklist [URIs: lyrion.ch] 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=dziltener%40lyrion.ch;ip=2001%3A470%3A142%3A%3A17;r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 PP_MIME_FAKE_ASCII_TEXT BODY: MIME text/plain claims to be ASCII but isn't -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --- guix/build-system/chicken.scm | 68 +++++++++++++++++++---------- guix/build/chicken-build-system.scm | 17 +++----- 2 files changed, 50 insertions(+), 35 deletions(-) diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..8c6b1f5e75 100644 --- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2020 raingloom ;;; Copyright © 2021 Ludovic Courtès ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2024 Daniel Ziltener ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,8 @@ (define-module (guix build-system chicken) #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) #:use-module (guix packages) #:export (%chicken-build-system-modules chicken-build @@ -40,15 +43,15 @@ (define* (egg-uri name version #:optional (extension ".tar.gz")) (define %chicken-build-system-modules ;; Build-side modules imported and used by default. - `((guix build chicken-build-system) + `((zilti build chicken-build-system) (guix build union) ,@%gnu-build-system-modules)) (define (default-chicken) + "Return the default Chicken package." ;; Lazily resolve the binding to avoid a circular dependency. - ;; TODO is this actually needed in every build system? (let ((chicken (resolve-interface '(gnu packages chicken)))) - (module-ref chicken 'chicken))) + (module-ref chicken 'chicken))) (define* (lower name #:key source inputs native-inputs outputs system target @@ -57,7 +60,7 @@ (define* (lower name #:rest arguments) "Return a bag for NAME." (define private-keywords - '(#:target #:chicken #:inputs #:native-inputs)) + '(#:target #:chicken #:inputs #:native-inputs #:outputs)) ;; TODO: cross-compilation support (and (not target) @@ -77,41 +80,58 @@ (define private-keywords ,@native-inputs)) (outputs outputs) (build chicken-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:extra-directories extra-directories) + `(list ,@(append-map + (lambda (name) + (match (assoc name inputs) + ((_ pkg) + (match (package-transitive-propagated-inputs pkg) + (((propagated-names . _) ...) + (cons name propagated-names)))))) + extra-directories)))))))) (define* (chicken-build name inputs - #:key - source + #:key source + (tests? #t) + (parallel-build? #f) + (build-flags ''()) + (configure-flags ''()) + (extra-directories ''()) (phases '%standard-phases) - (outputs '("out")) + (outputs '("out" "static")) (search-paths '()) (egg-name "") (unpack-path "") - (build-flags ''()) - (tests? #t) (system (%current-system)) (guile #f) (imported-modules %chicken-build-system-modules) - (modules '((guix build chicken-build-system) + (modules '((zilti build chicken-build-system) (guix build union) (guix build utils)))) (define builder (with-imported-modules imported-modules #~(begin (use-modules #$@(sexp->gexp modules)) - (chicken-build #:name #$name - #:source #+source - #:system #$system - #:phases #$phases - #:outputs #$(outputs->gexp outputs) - #:search-paths '#$(sexp->gexp - (map search-path-specification->sexp - search-paths)) - #:egg-name #$egg-name - #:unpack-path #$unpack-path - #:build-flags #$build-flags - #:tests? #$tests? - #:inputs #$(input-tuples->gexp inputs))))) + #$(with-build-variables inputs outputs + #~(chicken-build #:name #$name + #:source #+source + #:system #$system + #:phases #$phases + #:configure-flags #$configure-flags + #:extra-directories #$extra-directories + #:parallel-build? #$parallel-build? + #:outputs #$(outputs->gexp outputs) + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:egg-name #$egg-name + #:unpack-path #$unpack-path + #:build-flags #$build-flags + #:tests? #$tests? + #:inputs #$(input-tuples->gexp inputs)))))) (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) system #:graft? #f))) diff --git a/guix/build/chicken-build-system.scm b/guix/build/chicken-build-system.scm index 8f9f59cc25..6a4f0c43eb 100644 --- a/guix/build/chicken-build-system.scm +++ b/guix/build/chicken-build-system.scm @@ -42,13 +42,12 @@ (define (chicken-package? name) (define* (setup-chicken-environment #:key inputs outputs #:allow-other-keys) (setenv "CHICKEN_INSTALL_REPOSITORY" - (string-concatenate - ;; see TODO item about binary version above - (append (list (assoc-ref outputs "out") "/var/lib/chicken/11/") - (let ((oldenv (getenv "CHICKEN_INSTALL_REPOSITORY"))) - (if oldenv - (list ":" oldenv) - '()))))) + (string-append (assoc-ref outputs "out") "/var/lib/chicken/11/")) + (setenv "CHICKEN_INSTALL_PREFIX" + (string-append (assoc-ref outputs "out") "/bin/")) + (setenv "CHICKEN_REPOSITORY_PATH" + (string-append (getenv "CHICKEN_REPOSITORY_PATH") + ":" (getenv "CHICKEN_INSTALL_REPOSITORY"))) (setenv "CHICKEN_EGG_CACHE" (getcwd)) #t) @@ -104,10 +103,6 @@ (define* (check #:key egg-name tests? #:allow-other-keys) ;; there is no "-test-only" option, but we've already run install ;; so this just runs tests. ;; i think it's a fair assumption that phases won't be reordered. - (setenv "CHICKEN_REPOSITORY_PATH" - (string-append (getenv "CHICKEN_INSTALL_REPOSITORY") - ":" - (getenv "CHICKEN_REPOSITORY_PATH"))) (when tests? (invoke "chicken-install" "-cached" "-test" "-no-install" egg-name))) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 05 16:35:54 2024 Received: (at 68564) by debbugs.gnu.org; 5 Feb 2024 21:35:54 +0000 Received: from localhost ([127.0.0.1]:52413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rX6d7-0006Xf-Rm for submit@debbugs.gnu.org; Mon, 05 Feb 2024 16:35:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rX6d6-0006XT-Cg for 68564@debbugs.gnu.org; Mon, 05 Feb 2024 16:35:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX6cn-0000sN-LZ; Mon, 05 Feb 2024 16:35:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=btch/FiNpE9zJzhDKQe535sUCcTpnzdWmJ6YSaHSzb4=; b=BtfFiHWcPD0qJZiWEUug wnZ99D+nBo5nWeSqiwaVQDA75MKLUVzX0HizBVUEeDQrddSOqgQYzv4UZBwpYgFMyx3zYRSMgsDP2 Gt7JMBiGkzZ52PmUeqUMbJtKCIgJcB5p5fWJSoPxokfx8WHEk2uVxDnZMDUYKsCPBMyeDkCuOHX50 pApLTeh+sY6wsABkZmLdl4z32QTiLqjLR1ERRbvGgulZSWySVzvLiMdr/xfTAh1D0qHPNZY8NtJEv xZnVwtMDDMRyn8yk0z4i9P24J60JZQt9mX2jn5tX6mp2wUgsYRDizyYLzm0geeK3WZtla7kiRHQiQ HeIfNP8Q5ym5OA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Daniel Ziltener Subject: Re: [bug#68564] [PATCH] build-system: fix the Chicken build system In-Reply-To: <5f79ce0097f1092706b65abd99940d06@lyrion.ch> (Daniel Ziltener's message of "Thu, 18 Jan 2024 11:09:12 +0100") References: <5f79ce0097f1092706b65abd99940d06@lyrion.ch> Date: Mon, 05 Feb 2024 22:35:31 +0100 Message-ID: <87cytabnmk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 68564 Cc: 68564@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.1 (---) Hi Daniel, Daniel Ziltener skribis: > --- > guix/build-system/chicken.scm | 68 +++++++++++++++++++---------- > guix/build/chicken-build-system.scm | 17 +++----- > 2 files changed, 50 insertions(+), 35 deletions(-) This change contains several seemingly unrelated changes, some cosmetic/stylistic and others that have a functional impact, but it=E2=80= =99s not clear to me what the fix is. Could you clarify what problem you=E2=80=99re trying to fix? It=E2=80=99s also important to separate unrelated changes to help reviewers= and to help our future selves should we need to bisect the Git history. > (define %chicken-build-system-modules > ;; Build-side modules imported and used by default. > - `((guix build chicken-build-system) > + `((zilti build chicken-build-system) Leftover change? > + (modules '((zilti build chicken-build-system) Ditto. > + #$(with-build-variables inputs outputs > + #~(chicken-build #:name #$name > + #:source #+source It=E2=80=99s best if we can avoid =E2=80=98with-build-variables=E2=80=99: = =E2=80=98%build-inputs=E2=80=99 and =E2=80=98%outputs=E2=80=99, which this form adds, are now considered deprec= ated. > (define* (setup-chicken-environment #:key inputs outputs #:allow-other-k= eys) > (setenv "CHICKEN_INSTALL_REPOSITORY" > - (string-concatenate > - ;; see TODO item about binary version above > - (append (list (assoc-ref outputs "out") "/var/lib/chicken/11/= ") > - (let ((oldenv (getenv "CHICKEN_INSTALL_REPOSITORY"))) > - (if oldenv > - (list ":" oldenv) > - '()))))) > + (string-append (assoc-ref outputs "out") "/var/lib/chicken/11/= ")) > + (setenv "CHICKEN_INSTALL_PREFIX" > + (string-append (assoc-ref outputs "out") "/bin/")) > + (setenv "CHICKEN_REPOSITORY_PATH" > + (string-append (getenv "CHICKEN_REPOSITORY_PATH") > + ":" (getenv "CHICKEN_INSTALL_REPOSITORY"))) > (setenv "CHICKEN_EGG_CACHE" (getcwd)) > #t) >=20=20 > @@ -104,10 +103,6 @@ (define* (check #:key egg-name tests? #:allow-other-= keys) > ;; there is no "-test-only" option, but we've already run install > ;; so this just runs tests. > ;; i think it's a fair assumption that phases won't be reordered. > - (setenv "CHICKEN_REPOSITORY_PATH" > - (string-append (getenv "CHICKEN_INSTALL_REPOSITORY") > - ":" > - (getenv "CHICKEN_REPOSITORY_PATH"))) Could you explain why this statement is moved from one phase to the other? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 07 18:04:22 2024 Received: (at 68564) by debbugs.gnu.org; 7 Mar 2024 23:04:22 +0000 Received: from localhost ([127.0.0.1]:55326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riMmk-0003Yx-1e for submit@debbugs.gnu.org; Thu, 07 Mar 2024 18:04:22 -0500 Received: from 195-15-241-199.dc3-a.pub1.etik-cloud.com ([195.15.241.199]:31043 helo=lyrion.ch) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riMme-0003Yk-Pd for 68564@debbugs.gnu.org; Thu, 07 Mar 2024 18:04:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyrion.ch; s=20230702; t=1709852620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=fUILOY/3TSHfh7IZBl92z0AlnP8a53ZPUJI5EWe3LgY=; b=Hm7FTZaDCw/q/lS3MrUR7HxKQo33YMT9wEll22FGxz73JfN0LtlKSKzjAo+nLCYUD92qXl lM776w1t3TxjDNi6GvjLznGMwG35OthKnviRJn9US5IzX1ldulCYtTPWnlTOUw97fWeMjg sDxNQCqcVZbg+reBhD0h66jZqFwexJWoan5KuYsjnlpfkqJa55scGGG8eGw3ky7qDcf6xa hHNWmlizzdWRJCHGgukoPBkbeT9YVn+62oU7knyYhrf/MjT+o+NSW92SKdJzTac6b4tR0q Kv3qrDHgZKzjTPfexaL2MpxJlnV/BfV2Cc10xIeEgZaLEcJn8jFihU22HrOEiw== Received: from localhost ( [2a06:6880:42c:1600:a85:a578:71dc:aaf4]) by lyrion.ch (OpenSMTPD) with ESMTPSA id 82498ee2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 7 Mar 2024 23:03:40 +0000 (UTC) Message-ID: <68952d6a346ad09483bd6c64356916ac@lyrion.ch> From: Daniel Ziltener Date: Thu, 7 Mar 2024 22:45:58 +0100 Subject: [PATCH] build-system: fix the Chicken build system To: 68564@debbugs.gnu.org X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 68564 Cc: dziltener@lyrion.ch X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) --- guix/build-system/chicken.scm | 38 ++++++++++++++++++++++------- guix/build/chicken-build-system.scm | 27 +++++++++----------- 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..e2b93391bf 100644 --- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2020 raingloom ;;; Copyright © 2021 Ludovic Courtès ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2024 Daniel Ziltener ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,9 +24,12 @@ (define-module (guix build-system chicken) #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix monads) + #:use-module (guix download) #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) #:use-module (guix packages) #:export (%chicken-build-system-modules chicken-build @@ -45,10 +49,10 @@ (define %chicken-build-system-modules ,@%gnu-build-system-modules)) (define (default-chicken) + "Return the default Chicken package." ;; Lazily resolve the binding to avoid a circular dependency. - ;; TODO is this actually needed in every build system? (let ((chicken (resolve-interface '(gnu packages chicken)))) - (module-ref chicken 'chicken))) + (module-ref chicken 'chicken))) (define* (lower name #:key source inputs native-inputs outputs system target @@ -57,7 +61,7 @@ (define* (lower name #:rest arguments) "Return a bag for NAME." (define private-keywords - '(#:target #:chicken #:inputs #:native-inputs)) + '(#:target #:chicken #:inputs #:native-inputs #:outputs)) ;; TODO: cross-compilation support (and (not target) @@ -77,18 +81,31 @@ (define private-keywords ,@native-inputs)) (outputs outputs) (build chicken-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:extra-directories extra-directories) + `(list ,@(append-map + (lambda (name) + (match (assoc name inputs) + ((_ pkg) + (match (package-transitive-propagated-inputs pkg) + (((propagated-names . _) ...) + (cons name propagated-names)))))) + extra-directories)))))))) (define* (chicken-build name inputs - #:key - source + #:key source + (tests? #t) + (parallel-build? #f) + (build-flags ''()) + (configure-flags ''()) + (extra-directories ''()) (phases '%standard-phases) - (outputs '("out")) + (outputs '("out" "static")) (search-paths '()) (egg-name "") (unpack-path "") - (build-flags ''()) - (tests? #t) (system (%current-system)) (guile #f) (imported-modules %chicken-build-system-modules) @@ -103,6 +120,9 @@ (define builder #:source #+source #:system #$system #:phases #$phases + #:configure-flags #$configure-flags + #:extra-directories #$extra-directories + #:parallel-build? #$parallel-build? #:outputs #$(outputs->gexp outputs) #:search-paths '#$(sexp->gexp (map search-path-specification->sexp diff --git a/guix/build/chicken-build-system.scm b/guix/build/chicken-build-system.scm index 8f9f59cc25..1b8a50621e 100644 --- a/guix/build/chicken-build-system.scm +++ b/guix/build/chicken-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 raingloom +;;; Copyright © 2024 Daniel Ziltener ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,7 +33,6 @@ (define-module (guix build chicken-build-system) ;; CHICKEN_INSTALL_REPOSITORY is where dependencies are looked up ;; its first component is also where new eggs are installed. -;; TODO: deduplicate with go-build-system.scm ? ;; TODO: the binary version should be defined in one of the relevant modules ;; instead of being hardcoded everywhere. Tried to do that but got undefined ;; variable errors. @@ -42,13 +42,12 @@ (define (chicken-package? name) (define* (setup-chicken-environment #:key inputs outputs #:allow-other-keys) (setenv "CHICKEN_INSTALL_REPOSITORY" - (string-concatenate - ;; see TODO item about binary version above - (append (list (assoc-ref outputs "out") "/var/lib/chicken/11/") - (let ((oldenv (getenv "CHICKEN_INSTALL_REPOSITORY"))) - (if oldenv - (list ":" oldenv) - '()))))) + (string-append (assoc-ref outputs "out") "/var/lib/chicken/11/")) + (setenv "CHICKEN_INSTALL_PREFIX" + (string-append (assoc-ref outputs "out") "/bin/")) + (setenv "CHICKEN_REPOSITORY_PATH" + (string-append (getenv "CHICKEN_REPOSITORY_PATH") + ":" (getenv "CHICKEN_INSTALL_REPOSITORY"))) (setenv "CHICKEN_EGG_CACHE" (getcwd)) #t) @@ -58,9 +57,9 @@ (define* (setup-chicken-environment #:key inputs outputs #:allow-other-keys) (define* (unpack #:key source egg-name unpack-path #:allow-other-keys) "Relative to $CHICKEN_EGG_CACHE, unpack SOURCE in UNPACK-PATH, or EGG-NAME when UNPACK-PATH is unset. If the SOURCE archive has a single top level -directory, it is stripped so that the sources appear directly under UNPACK-PATH. -When SOURCE is a directory, copy its content into UNPACK-PATH instead of -unpacking." +directory, it is stripped so that the sources appear directly under +UNPACK-PATH. When SOURCE is a directory, copy its content into UNPACK-PATH +instead of unpacking." (define (unpack-maybe-strip source dest) (let* ((scratch-dir (string-append (or (getenv "TMPDIR") "/tmp") "/scratch-dir")) @@ -93,6 +92,7 @@ (define (unpack-maybe-strip source dest) (define* (build #:key egg-name #:allow-other-keys) "Build the Chicken egg named by EGG-NAME" + (invoke "echo" (getenv "CHICKEN_REPOSITORY_PATH")) (invoke "chicken-install" "-cached" "-no-install" egg-name)) (define* (install #:key egg-name #:allow-other-keys) @@ -104,11 +104,8 @@ (define* (check #:key egg-name tests? #:allow-other-keys) ;; there is no "-test-only" option, but we've already run install ;; so this just runs tests. ;; i think it's a fair assumption that phases won't be reordered. - (setenv "CHICKEN_REPOSITORY_PATH" - (string-append (getenv "CHICKEN_INSTALL_REPOSITORY") - ":" - (getenv "CHICKEN_REPOSITORY_PATH"))) (when tests? + (invoke "echo" (getenv "CHICKEN_REPOSITORY_PATH")) (invoke "chicken-install" "-cached" "-test" "-no-install" egg-name))) (define* (stamp-egg-version #:key egg-name name #:allow-other-keys) -- 2.44.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 04:50:20 2024 Received: (at 68564) by debbugs.gnu.org; 8 Mar 2024 09:50:20 +0000 Received: from localhost ([127.0.0.1]:56692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riWrr-0002rf-Mm for submit@debbugs.gnu.org; Fri, 08 Mar 2024 04:50:19 -0500 Received: from 195-15-241-199.dc3-a.pub1.etik-cloud.com ([195.15.241.199]:49163 helo=lyrion.ch) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riWrp-0002rV-IR for 68564@debbugs.gnu.org; Fri, 08 Mar 2024 04:50:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyrion.ch; s=20230702; t=1709891382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7U/P6ghXWwV3+KmkIhGuTScbRFxoUJXL3RqBwtjy+j8=; b=IsUeXzDwm7XeZ/rYPSdKNq//jEtCZBvoOPgW0ycNSdDR/AlR049JQAHj9nvKxVHA5+MD3z Sjov+li0Z5xTKubtYx6vgOUuU3GE+Wq1zdOCfWlY4Ky8GzamT1SFbF0aH+1K2qV6izrsGh dVONySqaKYtQNqFF4Cmpeo8s5dJfQHOwGE+g1EmbdAaNCv55mtkqCH0+A81QXXDIn1fwas UeQXm9PsEpO0FwSdpMKMgY0yyaDrZ6WFWw6lMWZimHmUM4DgeW9nOjif7GyaQf8Vv4nKwi 1z5+zOYNKo8LtrrrebWIw/cpbcVboF7eUyAeokkr4yECEdOQTBAv70M0MvFqwA== Received: from [IPV6:2a06:6880:42c:1600:50f3:a754:c01:3b8a] ( [2a06:6880:42c:1600:50f3:a754:c01:3b8a]) by lyrion.ch (OpenSMTPD) with ESMTPSA id c0eddb19 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <68564@debbugs.gnu.org>; Fri, 8 Mar 2024 09:49:41 +0000 (UTC) Message-ID: Date: Fri, 8 Mar 2024 10:49:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: 68564@debbugs.gnu.org From: Daniel Ziltener Subject: Re: [PATCH] build-system: fix the Chicken build system Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 68564 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Sorry for the late correction. I removed the `with-build-variables` again. The reasons I moved the `setenv` are: I wanted to have them grouped together, and the CHICKEN_REPOSITORY_PATH is now used properly; before that, I assume that whoever wrote the build system mistakenly thought CHICKEN_INSTALL_REPOSITORY would be equivalent, which it is not. I also just noticed I've left "echo" statements now; I'll remove them in a next message. Best regards, Daniel Ziltener From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 13:38:36 2024 Received: (at 68564) by debbugs.gnu.org; 8 Mar 2024 18:38:36 +0000 Received: from localhost ([127.0.0.1]:59564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rif75-0008OB-EZ for submit@debbugs.gnu.org; Fri, 08 Mar 2024 13:38:35 -0500 Received: from 195-15-241-199.dc3-a.pub1.etik-cloud.com ([195.15.241.199]:41417 helo=lyrion.ch) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rif6z-0008Nw-UZ for 68564@debbugs.gnu.org; Fri, 08 Mar 2024 13:38:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyrion.ch; s=20230702; t=1709923073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=teDkg0sJH7JjJLwoJlesdw3k93o2+Tnk+ZmDmszHrVk=; b=SbMKsgG8C+ydh+mN4urFaBO/wFQ2lugbibBf3V/yh0GYZ8utrWzsARtXftYjRLUtVyyAmG tTxDrE8uOAGLL0VknvwW6S7CRbjR5iLAhWyPE2hZeFjGiKKUqsjcVOw2nD5jNmVNo3LezC xvjKQYae6UAIy/wuOKaC0mQX/nbgIZmoNX2i/vNANoweASpV+UXAVgORGkb3P07oMoliCH Cfq/oZ1k2PtxBxkuY44C37r8joTdCOuVVtSuwcUsikTYb2XhjcZXIjRSERS+W1YLfOUE7Q 1339vgvgQJzV4+rzZvWJVbP+rrpw+DgxtVhzFjxzMRdCQtnbmcqDQSjUW5BIcw== Received: from localhost ( [2a06:6880:42c:1600:c3c9:f470:6a3a:68b6]) by lyrion.ch (OpenSMTPD) with ESMTPSA id 2844c324 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 8 Mar 2024 18:37:53 +0000 (UTC) Message-ID: <75af0d661d13dae3fcfac72b7a4f405b@lyrion.ch> From: Daniel Ziltener Date: Thu, 7 Mar 2024 22:45:58 +0100 Subject: [PATCH] build-system: fix the Chicken build system To: 68564@debbugs.gnu.org X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: --- guix/build-system/chicken.scm | 38 ++++++++++++++++++++++------- guix/build/chicken-build-system.scm | 25 ++++++++ 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..e2b93391bf 100644 --- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -2,6 +2,7 @@ ; [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 TVD_RCVD_IP Message was received from an IP address 0.8 DATE_IN_PAST_12_24 Date: is 12 to 24 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 PP_MIME_FAKE_ASCII_TEXT BODY: MIME text/plain claims to be ASCII but isn't 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 68564 Cc: dziltener@lyrion.ch X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) --- guix/build-system/chicken.scm | 38 ++++++++++++++++++++++------- guix/build/chicken-build-system.scm | 25 ++++++++----------- 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..e2b93391bf 100644 --- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2020 raingloom ;;; Copyright © 2021 Ludovic Courtès ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2024 Daniel Ziltener ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,9 +24,12 @@ (define-module (guix build-system chicken) #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix monads) + #:use-module (guix download) #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) #:use-module (guix packages) #:export (%chicken-build-system-modules chicken-build @@ -45,10 +49,10 @@ (define %chicken-build-system-modules ,@%gnu-build-system-modules)) (define (default-chicken) + "Return the default Chicken package." ;; Lazily resolve the binding to avoid a circular dependency. - ;; TODO is this actually needed in every build system? (let ((chicken (resolve-interface '(gnu packages chicken)))) - (module-ref chicken 'chicken))) + (module-ref chicken 'chicken))) (define* (lower name #:key source inputs native-inputs outputs system target @@ -57,7 +61,7 @@ (define* (lower name #:rest arguments) "Return a bag for NAME." (define private-keywords - '(#:target #:chicken #:inputs #:native-inputs)) + '(#:target #:chicken #:inputs #:native-inputs #:outputs)) ;; TODO: cross-compilation support (and (not target) @@ -77,18 +81,31 @@ (define private-keywords ,@native-inputs)) (outputs outputs) (build chicken-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:extra-directories extra-directories) + `(list ,@(append-map + (lambda (name) + (match (assoc name inputs) + ((_ pkg) + (match (package-transitive-propagated-inputs pkg) + (((propagated-names . _) ...) + (cons name propagated-names)))))) + extra-directories)))))))) (define* (chicken-build name inputs - #:key - source + #:key source + (tests? #t) + (parallel-build? #f) + (build-flags ''()) + (configure-flags ''()) + (extra-directories ''()) (phases '%standard-phases) - (outputs '("out")) + (outputs '("out" "static")) (search-paths '()) (egg-name "") (unpack-path "") - (build-flags ''()) - (tests? #t) (system (%current-system)) (guile #f) (imported-modules %chicken-build-system-modules) @@ -103,6 +120,9 @@ (define builder #:source #+source #:system #$system #:phases #$phases + #:configure-flags #$configure-flags + #:extra-directories #$extra-directories + #:parallel-build? #$parallel-build? #:outputs #$(outputs->gexp outputs) #:search-paths '#$(sexp->gexp (map search-path-specification->sexp diff --git a/guix/build/chicken-build-system.scm b/guix/build/chicken-build-system.scm index 8f9f59cc25..944f023987 100644 --- a/guix/build/chicken-build-system.scm +++ b/guix/build/chicken-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 raingloom +;;; Copyright © 2024 Daniel Ziltener ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,7 +33,6 @@ (define-module (guix build chicken-build-system) ;; CHICKEN_INSTALL_REPOSITORY is where dependencies are looked up ;; its first component is also where new eggs are installed. -;; TODO: deduplicate with go-build-system.scm ? ;; TODO: the binary version should be defined in one of the relevant modules ;; instead of being hardcoded everywhere. Tried to do that but got undefined ;; variable errors. @@ -42,13 +42,12 @@ (define (chicken-package? name) (define* (setup-chicken-environment #:key inputs outputs #:allow-other-keys) (setenv "CHICKEN_INSTALL_REPOSITORY" - (string-concatenate - ;; see TODO item about binary version above - (append (list (assoc-ref outputs "out") "/var/lib/chicken/11/") - (let ((oldenv (getenv "CHICKEN_INSTALL_REPOSITORY"))) - (if oldenv - (list ":" oldenv) - '()))))) + (string-append (assoc-ref outputs "out") "/var/lib/chicken/11/")) + (setenv "CHICKEN_INSTALL_PREFIX" + (string-append (assoc-ref outputs "out") "/bin/")) + (setenv "CHICKEN_REPOSITORY_PATH" + (string-append (getenv "CHICKEN_REPOSITORY_PATH") + ":" (getenv "CHICKEN_INSTALL_REPOSITORY"))) (setenv "CHICKEN_EGG_CACHE" (getcwd)) #t) @@ -58,9 +57,9 @@ (define* (setup-chicken-environment #:key inputs outputs #:allow-other-keys) (define* (unpack #:key source egg-name unpack-path #:allow-other-keys) "Relative to $CHICKEN_EGG_CACHE, unpack SOURCE in UNPACK-PATH, or EGG-NAME when UNPACK-PATH is unset. If the SOURCE archive has a single top level -directory, it is stripped so that the sources appear directly under UNPACK-PATH. -When SOURCE is a directory, copy its content into UNPACK-PATH instead of -unpacking." +directory, it is stripped so that the sources appear directly under +UNPACK-PATH. When SOURCE is a directory, copy its content into UNPACK-PATH +instead of unpacking." (define (unpack-maybe-strip source dest) (let* ((scratch-dir (string-append (or (getenv "TMPDIR") "/tmp") "/scratch-dir")) @@ -104,10 +103,6 @@ (define* (check #:key egg-name tests? #:allow-other-keys) ;; there is no "-test-only" option, but we've already run install ;; so this just runs tests. ;; i think it's a fair assumption that phases won't be reordered. - (setenv "CHICKEN_REPOSITORY_PATH" - (string-append (getenv "CHICKEN_INSTALL_REPOSITORY") - ":" - (getenv "CHICKEN_REPOSITORY_PATH"))) (when tests? (invoke "chicken-install" "-cached" "-test" "-no-install" egg-name))) -- 2.44.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 26 09:45:05 2024 Received: (at 68564) by debbugs.gnu.org; 26 Mar 2024 13:45:06 +0000 Received: from localhost ([127.0.0.1]:33113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rp76v-0000hn-I6 for submit@debbugs.gnu.org; Tue, 26 Mar 2024 09:45:05 -0400 Received: from 195-15-241-199.dc3-a.pub1.etik-cloud.com ([195.15.241.199]:47968 helo=lyrion.ch) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rp76s-0000gL-6y; Tue, 26 Mar 2024 09:45:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyrion.ch; s=20230702; t=1711459099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BeOoYvuTVBw0hCWg8y8ihN4w1otJTg2n9uffVkKEJoQ=; b=y1BX2FFEtb0ySw4g4FuDQrfcKc4wi0Of3bNBq0KcwwMgV9gDmG/a7BOwhkAlSjCVgfB4YE cebGv6jQjipuaLtX5szAvrtW4m/j8/i5rRq6JaUJhFkJ2X/2iDcWbTDZlrpz70wnRCH0KL vWpS2y/6hZOHC1jfl7J/HryvdWNsWef95E13VNf2HUoHhsC9DdYyiL3myaI2yOuQ4nGItC zmI54aAjpYRX1wL8ZHsNkyAGWBGDs00J+XYcR1Z/gy6EYeVCvBoVD6OuvpOtyIBKQNefPL Hpqp5rl4Vd06HACKGR+RQD8JEB5Oy77Ulhz82TbMyXmdip6lE9TjskNEOxZLOQ== Received: from [IPV6:2a00:1f:99c0:3c01:8fc9:e8ec:45e0:6cde] ( [2a00:1f:99c0:3c01:8fc9:e8ec:45e0:6cde]) by lyrion.ch (OpenSMTPD) with ESMTPSA id dadf46f4 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 26 Mar 2024 13:18:19 +0000 (UTC) Message-ID: <4fa66aa3-78db-b1f1-82e1-8677859492d1@lyrion.ch> Date: Tue, 26 Mar 2024 14:18:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: 68564@debbugs.gnu.org, control@debbugs.gnu.org From: Daniel Ziltener Subject: Re: [PATCH] build-system: fix the Chicken build system Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 68564 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) close 68564 thanks From unknown Thu Jun 19 14:20:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 24 Apr 2024 11:25:50 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator