From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2NjtEM7vpmXnDQEAqHPOHw:P1 (envelope-from ) for ; Tue, 16 Jan 2024 22:06:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2NjtEM7vpmXnDQEAqHPOHw (envelope-from ) for ; Tue, 16 Jan 2024 22:06:22 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lyrion.ch header.s=20230702 header.b=cqd5y0yq; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705439182; h=from:from:sender:sender:reply-to: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:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Uea6jnZ1AluB64eLTtsjBofNK+NFIUwiZ2Cs5/iwaVw=; b=Ib1TJLnNdJxZZV8Q5NYt/ncSxpeKA7wUgbDhdfvdu1baZlKEaQPGor44lzbDbR1Br0e+PI D7BztFarKQ0mTUmUbARHHtZd6gd8Lby1bi1UTq5U9LgcUwxIDiDvwMwts+crH8d8Nnqzsp XDonOiI8sKtX1YfVEktUT4tfp0a/vqAZ/0gX9/fnqhjE3NE3gEW5sVKzH6qUJwJobIcQqO AoKvTFEz7ZFO6Go4rtV3dOw27hg5UzVbnpkkj5eLL0XNesaZ12y4IYEN8u+7oOXePI+QO6 T4jnVqaSEV1uIakoF8HunTABRttoT3jXqyZTExIQ2qXDaEC+ai47CYDRMphdlA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705439182; a=rsa-sha256; cv=none; b=K2ZDUSzx6By1VgKOBES3G5bRSrNx5vfd4/jOrFJoR+WlzVzhEgEMxH4QxcumjaTTk9i1wV v8uLDyqR3g0Hs0WKGjRoW8/mzWpwp4n/xZffQ9+/rjW6g4Wg1USVQ2e3cyAXtTV5CpdMpN iTRY87LSDEDaTWeyxvdOXgrX4E/98vxJsGx1cc1Hd9RJGvSwdUKaCn0nT8/JKoqSmxm/+s zU9m5EZF0gXhP9oK9g+Py+KhxvISHZALw+u7NwhEzSKu2Vw+gb1oCd1lyLI8O028Ot3pHr 6c5KiEwbBG9gNuNN3ZYvAkp9Gt+TrYP8NJAe5WxP37dDblJhnBQKp2gGb2ZjMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lyrion.ch header.s=20230702 header.b=cqd5y0yq; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" 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 0DBED77F83 for ; Tue, 16 Jan 2024 22:06:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPqdJ-0006RQ-EY; Tue, 16 Jan 2024 16:06:05 -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 1rPqdF-0006R6-Uh for guix-patches@gnu.org; Tue, 16 Jan 2024 16:06:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rPqdF-0000ow-CO for guix-patches@gnu.org; Tue, 16 Jan 2024 16:06:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rPqdF-0005Hs-Nu for guix-patches@gnu.org; Tue, 16 Jan 2024 16:06:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68517] [PATCH] guix: chicken-build-system: fixes to make it actually work Resent-From: Daniel Ziltener Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Jan 2024 21:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68517 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68517@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170543912820272 (code B ref -1); Tue, 16 Jan 2024 21:06:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jan 2024 21:05:28 +0000 Received: from localhost ([127.0.0.1]:49874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPqci-0005Gu-A7 for submit@debbugs.gnu.org; Tue, 16 Jan 2024 16:05:28 -0500 Received: from lists.gnu.org ([2001:470:142::17]:39234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPqcf-0005Gh-IZ for submit@debbugs.gnu.org; Tue, 16 Jan 2024 16:05:26 -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 1rPqcY-0006Fy-Cb for guix-patches@gnu.org; Tue, 16 Jan 2024 16:05:18 -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 1rPqcV-0000f3-Cy for guix-patches@gnu.org; Tue, 16 Jan 2024 16:05:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyrion.ch; s=20230702; t=1705439105; 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=Uea6jnZ1AluB64eLTtsjBofNK+NFIUwiZ2Cs5/iwaVw=; b=cqd5y0yq9p0vUgLyJBBRxoVAsq2IOSWzsZ3EWX7K/EtUSUHD9pDrLmEr5ULUvMk2lvZkm+ Pg6ThoMK/pbrAQsVK1r6MXNwEGTY1WMQqhCXL1Sl11GZJcQ9lV4slBuYidRPgklgImxJUf +gXC1/SFiu6arkUhH9cs+dm2bQWGvXzFuaJaWk7OAhz54Bf/mbn3QLrTRRr++vd7cfu3Se MMe81Kaqvw9mgt4ZsnnvkvgzOo9rhjqrphz1TkucoCUJraICjcyNSjA7oEtlZMCGRwPzQt YvuGCmYNAmzdBP35UrvBJl78LUlEERFhUcdrp5bCftWdN9QcHUYnmUB2SQNuHQ== Received: from [192.168.178.38] ( [78.31.198.70]) by lyrion.dc3-a.pub1.infomaniak.cloud (OpenSMTPD) with ESMTPSA id e9eb5e5d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 16 Jan 2024 21:05:05 +0000 (UTC) Message-ID: <2d16444a-92b5-3474-3ab3-2ba4d2851766@lyrion.ch> Date: Tue, 16 Jan 2024 22:05:04 +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 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: 23 X-Spam_score: 2.3 X-Spam_bar: ++ X-Spam_report: (2.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Daniel Ziltener X-ACL-Warn: , Daniel Ziltener via Guix-patches From: Daniel Ziltener via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -7.19 X-Spam-Score: -7.19 X-Migadu-Queue-Id: 0DBED77F83 X-TUID: 1Wh9YdDDVHwc --- guix/build-system/chicken.scm | 50 ++++++++++++++++++++--------- guix/build/chicken-build-system.scm | 17 ++++------ 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..17c3b7b144 100644 --- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -45,8 +45,8 @@ (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))) @@ -77,18 +77,32 @@ (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 (phases '%standard-phases) - (outputs '("out")) + (outputs '("out" "static")) (search-paths '()) (egg-name "") (unpack-path "") (build-flags ''()) + (configure-flags ''()) + (extra-directories ''()) (tests? #t) + (parallel-build? #f) (system (%current-system)) (guile #f) (imported-modules %chicken-build-system-modules) @@ -99,19 +113,23 @@ (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.43.0