[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#61255] [PATCH 2/5] gexp: computed-file: Honor %guile-for-build.
From: |
Maxim Cournoyer |
Subject: |
[bug#61255] [PATCH 2/5] gexp: computed-file: Honor %guile-for-build. |
Date: |
Fri, 03 Feb 2023 22:43:17 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi Luvodic,
Ludovic Courtès <ludo@gnu.org> writes:
> Hello!
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> * guix/gexp.scm (computed-file): Set the default value of the #:guile
>> argument
>> to that of the %guile-for-build parameter.
>
> [...]
>
>> (define* (computed-file name gexp
>> - #:key guile (local-build? #t) (options '()))
>> + #:key (guile (%guile-for-build))
>> + (local-build? #t) (options '()))
>
> I think that would lead ‘computed-file’ to pick (%guile-for-build) at
> the wrong time (time of call instead of time of lowering).
>
> Commit ab25eb7caaf5571cc9f8d6397a1eae127d7e29d1 made it #f such that
> ‘gexp->derivation’ gets to resolve it at the “right” time.
I see! I think you are right. Would making the change in the
associated gexp compiler do the right thing? Currently it ignores the
%guile-for-build fluid as set in the tests/pack.scm test suite for
example. Something like this:
--8<---------------cut here---------------start------------->8---
modified guix/gexp.scm
@@ -584,7 +584,7 @@ (define-record-type <computed-file>
(options computed-file-options)) ;list of arguments
(define* (computed-file name gexp
- #:key (guile (%guile-for-build))
+ #:key guile
(local-build? #t) (options '()))
"Return an object representing the store item NAME, a file or directory
computed by GEXP. When LOCAL-BUILD? is #t (the default), it ensures the
@@ -601,7 +601,8 @@ (define-gexp-compiler (computed-file-compiler (file
<computed-file>)
;; gexp.
(match file
(($ <computed-file> name gexp guile options)
- (mlet %store-monad ((guile (lower-object (or guile (default-guile))
+ (mlet %store-monad ((guile (lower-object (or guile (%guile-for-build)
+ (default-guile))
system #:target #f)))
(apply gexp->derivation name gexp #:guile-for-build guile
#:system system #:target target options)))))
--8<---------------cut here---------------end--------------->8---
I've verified that 'make check TESTS=tests/pack.scm' is still happy
(without such patch, with patch 3/5 applied, the
"self-contained-tarball" would try to build a non-bootstrap guile and
timeout (on my old machine).
Thanks and enjoy FOSDEM!
--
Maxim
- [bug#61255] [PATCH 0/5] Add support for the RPM format to "guix pack", Maxim Cournoyer, 2023/02/03
- [bug#61255] [PATCH 2/5] gexp: computed-file: Honor %guile-for-build., Maxim Cournoyer, 2023/02/03
- [bug#61255] [PATCH 2/5] gexp: computed-file: Honor %guile-for-build., Ludovic Courtès, 2023/02/03
- [bug#61255] [PATCH 2/5] gexp: computed-file: Honor %guile-for-build.,
Maxim Cournoyer <=
- [bug#61255] [PATCH 0/5] Add support for the RPM format to "guix pack", Ludovic Courtès, 2023/02/12
- [bug#61255] [PATCH 0/5] Add support for the RPM format to "guix pack", Maxim Cournoyer, 2023/02/16
- [bug#61255] (%guile-for-build) default in ‘computed-file’, Ludovic Courtès, 2023/02/23
- [bug#61255] (%guile-for-build) default in ‘computed-file’, Maxim Cournoyer, 2023/02/23
- [bug#61255] [PATCH 0/5] Add support for the RPM format to "guix pack", Ludovic Courtès, 2023/02/27
- [bug#61255] [PATCH 0/5] Add support for the RPM format to "guix pack", Maxim Cournoyer, 2023/02/27
- [bug#61255] bug#61841: ‘guix shell’ computes different package derivation than ‘guix build’, Ludovic Courtès, 2023/02/27
- [bug#61255] bug#61841: ‘guix shell’ computes different package derivation than ‘guix build’, Maxim Cournoyer, 2023/02/27
[bug#61255] [PATCH 5/5] pack: Add RPM format., Maxim Cournoyer, 2023/02/03