all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Unexpected error with #~(modify-phases
@ 2023-01-27 18:55 Simon Tournier
  2023-01-27 19:03 ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Tournier @ 2023-01-27 18:55 UTC (permalink / raw)
  To: Guix Devel, Ludovic Courtès

Hi,

Reviewing #59997 [1], there is something I am missing.

Using the V2, all works as expected.  But when I just modify with this
diff:

--8<---------------cut here---------------start------------->8---
1 file changed, 2 insertions(+), 2 deletions(-)
gnu/packages/minimacy.scm | 4 ++--

modified   gnu/packages/minimacy.scm
@@ -48,8 +48,8 @@ (define-public minimacy
                "X11"             ;for GUI programs, with X11 and ALSA
                "X11GL"))         ;for GUI programs, with X11, OpenGL, and ALSA
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
+     (list #:phases
+       #~(modify-phases %standard-phases
          (add-after 'unpack 'patch-path
            (lambda* (#:key outputs #:allow-other-keys)
              (substitute* "src/hw.c"
--8<---------------cut here---------------end--------------->8---

then I get this error:

--8<---------------cut here---------------start------------->8---
gnu/packages/minimacy.scm:59:9: error: (replace (quote build) (lambda _ (chdir "unix") (invoke "make" "nox") (for-each delete-file (find-files "../obj" "\\.o$")) (invoke "make" "x11") (for-each delete-file (find-files "../obj" "\\.o$")) (invoke "make" "x11gl") (chdir ".."))): 'replace' may only be used within 'modify-inputs'
--8<---------------cut here---------------end--------------->8---

where the (unmodified) phase reads:

--8<---------------cut here---------------start------------->8---
         (add-after 'unpack 'patch-path
[...]
         (delete 'configure)
         (replace 'build
           (lambda _
             (chdir "unix")
             (invoke "make" "nox")
             (for-each delete-file
                       (find-files "../obj" "\\.o$"))
             (invoke "make" "x11")
             (for-each delete-file
                       (find-files "../obj" "\\.o$"))
             (invoke "make" "x11gl")
             (chdir "..")))
         (replace 'install
[...]
--8<---------------cut here---------------end--------------->8---

What do I miss?

1: https://issues.guix.gnu.org/msgid/m1tu219bmo.fsf@fastmail.net


Cheers,
simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unexpected error with #~(modify-phases
  2023-01-27 18:55 Unexpected error with #~(modify-phases Simon Tournier
@ 2023-01-27 19:03 ` Tobias Geerinckx-Rice
  2023-01-27 19:16   ` Simon Tournier
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Geerinckx-Rice @ 2023-01-27 19:03 UTC (permalink / raw)
  To: guix-devel, Simon Tournier, Guix Devel, Ludovic Courtès

You're probably missing (guix gexp), and the 'replace' syntax fails before Guile ever gets to expanding the '#~'.

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unexpected error with #~(modify-phases
  2023-01-27 19:03 ` Tobias Geerinckx-Rice
@ 2023-01-27 19:16   ` Simon Tournier
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Tournier @ 2023-01-27 19:16 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Guix Devel, Ludovic Courtès

Hi Tobias,

On Fri, 27 Jan 2023 at 20:03, Tobias Geerinckx-Rice <me@tobias.gr> wrote:
>
> You're probably missing (guix gexp), and the 'replace' syntax fails before Guile ever gets to expanding the '#~'.

Damned!  Stupid me!  I missed the obvious.  Thanks for the quick help. :-)

Cheerw,
simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-27 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-27 18:55 Unexpected error with #~(modify-phases Simon Tournier
2023-01-27 19:03 ` Tobias Geerinckx-Rice
2023-01-27 19:16   ` Simon Tournier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.