GNU bug report logs - #68517
[PATCH] guix: chicken-build-system: fixes to make it actually work

Previous Next

Package: guix-patches;

Reported by: Daniel Ziltener <dziltener <at> lyrion.ch>

Date: Tue, 16 Jan 2024 21:06:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68517 in the body.
You can then email your comments to 68517 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#68517; Package guix-patches. (Tue, 16 Jan 2024 21:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Ziltener <dziltener <at> lyrion.ch>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 16 Jan 2024 21:06:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Ziltener <dziltener <at> lyrion.ch>
To: guix-patches <at> gnu.org
Subject: [PATCH] guix: chicken-build-system: fixes to make it actually work
Date: Tue, 16 Jan 2024 22:05:04 +0100
---
 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





Information forwarded to guix-patches <at> gnu.org:
bug#68517; Package guix-patches. (Thu, 18 Jan 2024 10:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 68517 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Ziltener <dziltener <at> lyrion.ch>
To: 68517 <at> debbugs.gnu.org
Subject: [PATCH] guix: chicken-build-system: fixes to make it actually work
Date: Thu, 18 Jan 2024 11:12:35 +0100
close 68517
thanks




bug closed, send any further explanations to 68517 <at> debbugs.gnu.org and Daniel Ziltener <dziltener <at> lyrion.ch> Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 24 Jan 2024 15:11:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#68517; Package guix-patches. (Wed, 24 Jan 2024 15:12:02 GMT) Full text and rfc822 format available.

Message #13 received at 68517-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Daniel Ziltener <dziltener <at> lyrion.ch>
Cc: 68517-done <at> debbugs.gnu.org
Subject: Re: [bug#68517] [PATCH] guix: chicken-build-system: fixes to make
 it actually work
Date: Wed, 24 Jan 2024 10:11:08 -0500
Hi,

Daniel Ziltener <dziltener <at> lyrion.ch> writes:

> close 68517
> thanks

You forgot to include the 'GNU Debbugs <control <at> debbugs.gnu.org>'
control server in CC :-).

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#68517; Package guix-patches. (Wed, 24 Jan 2024 20:53:02 GMT) Full text and rfc822 format available.

Message #16 received at 68517 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Ziltener <dziltener <at> lyrion.ch>
To: 68517 <at> debbugs.gnu.org
Cc: GNU Debbugs <control <at> debbugs.gnu.org>
Subject: [PATCH] guix: chicken-build-system: fixes to make it actually work
Date: Wed, 24 Jan 2024 21:52:23 +0100
close 67966
thanks





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Feb 2024 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 118 days ago.

Previous Next


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