guix: Use 'gexp->derivation' instead of 'build-expression->derivation'.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • phodina
Owner
unassigned
Submitted by
phodina
Severity
normal
P
P
phodina wrote on 27 Jan 2022 15:38
(name . Guix Patches)(address . guix-patches@gnu.org)
rfhegYyhkOl1PLTymlL_2WhZhTLznyClwVK_EGXD6ABRwvGsI2KijYm9Z7hAMrcCUaWngOZg-_VK9piF63qGtoQNyZAHK1EYAh9V4zrVjx4=@protonmail.com
Hi,

I've noticed in the output of bootstraping the guix package some warnings about deprecated expression.

----
Petr
Attachment: file
From e128b9d35060187b04ebd36cabd152f0e968dc87 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Thu, 27 Jan 2022 15:32:35 +0100
Subject: [PATCH] guix: Use 'gexp->derivation' instead of
'build-expression->derivation'.

* guix/derivations.scm: Update deprecated expression.
* guix/grafts.scm: Same as above.

Toggle diff (28 lines)
diff --git a/guix/derivations.scm b/guix/derivations.scm
index f77ea179f4..615bb161d1 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -1218,7 +1218,7 @@ (define builder
#:opts %auto-compilation-options)))))
files)))
- (build-expression->derivation store name builder
+ (gexp->derivation store name builder
#:inputs `(("modules" ,module-dir))
#:system system
#:guile-for-build guile
diff --git a/guix/grafts.scm b/guix/grafts.scm
index 0ffda8f9aa..e0a97e895b 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -134,7 +134,7 @@ (define properties
((($ <graft> sources source-outputs targets target-outputs) ...)
(let ((sources (zip sources source-outputs))
(targets (zip targets target-outputs)))
- (build-expression->derivation store name build
+ (gexp->derivation store name build
#:system system
#:guile-for-build guile
#:modules '((guix build graft)
--
2.34.0
L
L
Ludovic Courtès wrote on 29 Jan 2022 23:58
(name . phodina)(address . phodina@protonmail.com)(address . 53584@debbugs.gnu.org)
87zgne9mjy.fsf@gnu.org
Hi,

phodina <phodina@protonmail.com> skribis:

Toggle quote (36 lines)
> From e128b9d35060187b04ebd36cabd152f0e968dc87 Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Thu, 27 Jan 2022 15:32:35 +0100
> Subject: [PATCH] guix: Use 'gexp->derivation' instead of
> 'build-expression->derivation'.
>
> * guix/derivations.scm: Update deprecated expression.
> * guix/grafts.scm: Same as above.
>
> diff --git a/guix/derivations.scm b/guix/derivations.scm
> index f77ea179f4..615bb161d1 100644
> --- a/guix/derivations.scm
> +++ b/guix/derivations.scm
> @@ -1218,7 +1218,7 @@ (define builder
> #:opts %auto-compilation-options)))))
> files)))
>
> - (build-expression->derivation store name builder
> + (gexp->derivation store name builder
> #:inputs `(("modules" ,module-dir))
> #:system system
> #:guile-for-build guile
> diff --git a/guix/grafts.scm b/guix/grafts.scm
> index 0ffda8f9aa..e0a97e895b 100644
> --- a/guix/grafts.scm
> +++ b/guix/grafts.scm
> @@ -134,7 +134,7 @@ (define properties
> ((($ <graft> sources source-outputs targets target-outputs) ...)
> (let ((sources (zip sources source-outputs))
> (targets (zip targets target-outputs)))
> - (build-expression->derivation store name build
> + (gexp->derivation store name build
> #:system system
> #:guile-for-build guile
> #:modules '((guix build graft)

It’s unfortunately not that simple: the above code doesn’t work, notably
because ‘gexp->derivation’ is a monadic procedure, unlike
‘build-expression->derivation’.

Also, the first hunk is unnecessary since it’s in an internal procedure
that’s used by ‘build-expression->derivation’ itself.

I’m closing it for now but this is something we should address
eventually!

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 29 Jan 2022 23:58
control message for bug #53584
(address . control@debbugs.gnu.org)
87y22y9mjp.fsf@gnu.org
tags 53584 wontfix
close 53584
quit
?