From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kK4TIXC0PWW6UwAAauVa8A:P1 (envelope-from ) for ; Sun, 29 Oct 2023 02:25:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kK4TIXC0PWW6UwAAauVa8A (envelope-from ) for ; Sun, 29 Oct 2023 02:25:04 +0100 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 C93106718A for ; Sun, 29 Oct 2023 02:25:03 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=lbouXtsJ; dkim=pass header.d=wolfsden.cz header.s=mail header.b=ghJWXjHw; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698542704; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gqBnoGx5JikVw1dkNhT3pVKdCv3gFAenFd8HkkhhqKk=; b=JsEP9uMZWIx+2aVG+NMC6L2jvUZKB6zuBYD+tdk3rvBaHfnr1wZkR6m9In3UZOk71sx/6Z jw5/ypYl13rMsgDsu6rWUjWTcTaY4I4y/dIp80C1TogItoW2Vazm+1LWb9Bq5UUUGcSBJH Q206Kl6GUHyK5GGqQMJZu2gZ+3jnH5mFIO20mXip+6//a2FDeA0fCTHUoMbsXHV7V9PZ+c llD+fMpr6GLVR+DRjNChVRJIdxVa/2Fwy0pUghVPKH2/y4ZR+gLfonR0+78XdJSYIJXEEf +dKmS0A1F6EGvsUq8QNYlEHzznSnvIt7JSscdLgkbbZViaZYCQVSpc0ReJubsQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=lbouXtsJ; dkim=pass header.d=wolfsden.cz header.s=mail header.b=ghJWXjHw; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698542704; a=rsa-sha256; cv=none; b=gzZexJYSRRiccuHyviSQg/+GvlUUjkAkBtP7Z6Cdy8K3lfCSFJLuuDuvO8dsM8ZQImMvkA 0ecC9dyiKRWuyQ7quLIBW1sbEvjGAidepzRq6rof0B3q8ZBrBwkfqV4ogO07V/EPhk0e3a brfl/uJmzQSJqU/a2McAAPH4KkSDHZBCgwaK8DqhXR/gaQNmETOXhC3E6/f2mEiSYU5N4g 3iS4whsS0OePK+/PY+UQ8/o4d8bTQC7Y3Wl5sdY3kyBhw7stj+KrQy4QI7B6wqMhktE+pU xMCxV6VLWnvO0SwEaS+mUGn9DefwJQ6MZ/07WwsYZ2DXLcMS5qmRHuulzoXzyw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwuXQ-0004q2-IF; Sat, 28 Oct 2023 21:24:24 -0400 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 1qwuXO-0004pb-OU for help-guix@gnu.org; Sat, 28 Oct 2023 21:24:22 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwuXM-0002LT-Az for help-guix@gnu.org; Sat, 28 Oct 2023 21:24:22 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 1AE7E27548C; Sun, 29 Oct 2023 01:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1698542655; bh=8xzy8O7PQLjL+FKrRP31BWRsuuGrVODWcPJsNtIOd6A=; h=Date:From:To:Subject; b=lbouXtsJNsMu5/lAdaLBxCmfMlDBrRrY6Y+IqGBmWVPN/v3Wxa4vW62Pc2XMEXFG0 oYCIPbOcZ0CJLg/VKqTCKxpfcekJwzuBK3zF5mOqpz3Ei89mgjCOiu0fL/67HREdWo 5Fu4C9BpGa/U451pNUALNh9VNccuI9kfMVYXojsm+ZlcYPuNRlwSSpFrtV8rnywFpg HdXYm3v85nOirpwQVFksz5AOGjhkA31SGuwOxQZPzqHRiJykdRz2qXAwbU+/TpAw6O O3bBADFFhzm86xGMtgT0nk6r7zbrREVSsur6eYNiODOcXnS+76NaC6jJhQ4y8Vy+0R u91tmqm/Nr2Og3PgFcZH05GH57j6cU8cZMZFWUww8HG6NZlnc71icEOuI54Z9QJIuT lNjqfvUrSlaMezu0fsxD44cRn+CwQ7YfMEyA9s5/YXhiIDjo275nmPT0EadvxBBazQ 2/bUZA2GMx/AQGT0Rlw5PwIZppXgZUOo3/etwCQMDdsL6BXIdOlAkuyJo9n+xGOWHG UjzVZ+E4Geahc73piz7uYYrvTi4KZVIIeKvlCGIV24MwQCP5dNI4AfD4nGziVWeyQh Xq8G/3kBdsPHJ36Scvr8d3eZUlUJgDoXz/8K7JJ6b8RjEQxaOzRiWjs62vXRVAzlW7 nn/8CG5YtBTaECc7wMQqkLXE= Received: from localhost (unknown [81.17.16.79]) by wolfsden.cz (Postfix) with ESMTPSA id 7DA9727424F for ; Sun, 29 Oct 2023 01:24:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1698542653; bh=8xzy8O7PQLjL+FKrRP31BWRsuuGrVODWcPJsNtIOd6A=; h=Date:From:To:Subject; b=ghJWXjHwnqazPyD7lX9ycc6dZSVqHfR8+NX++Wuc7yXpUupM2tY4xWcHuAqY/Cg+H dy8JqntdKJG14eVB0G+IE3RgTKQP3JGm/uncAfse72i+98If3OLflGgKYhvctOZalU dLq+9QFyzwmIldsvlI4RzCQw7ykutayRaSpNAt52a9W2GLKTYHOn0Z4TM6joKMXmii CLiC9jN1srSWDH6HB9rMjocWCmRkylrKbrK9BEupZ4nvIJhZJqyJ61ck9+Ofg/BxrR kyuVuhTUBRuidIQN5xoDyykoNdU35yh3NPYUzwqVHdAIWZHM4ra+1Qv0nha63pelcK SS1DR8brALKf+GgFSlUSRrzWw9Y7JOcJ+BEvsklMeq2qLkt+FpkxaVUdsxNsUUHX1P YfFwhzr6uQO0ujho6VDnI8a5IzVeIeUZi/h3XqXF/Yttna9o7zQahQS0LfYWkvZVdc /J2aN5826Qy1Bnd2NhUwNFcGRrBms7xHyHiB5mwKFbcQi07Zu7AHHd+wCWKokCwW50 K7lI4k8Xm+gqbEVkkAz7++50DzgqZP8O267PM3ir5VQH7HcAM92l8sl1HiG07umzKh xrFCPQRexsF9Zn7UJTl5i172IVTdOxsHV8QWwUKE9ILD0XqRIuRVoUaDFF5lduE3yP LM5zA1EyYvoraftsEUjRCC5A= Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 7c19d1f2 for ; Sun, 29 Oct 2023 01:24:11 +0000 (UTC) Date: Sun, 29 Oct 2023 02:24:11 +0100 From: Tomas Volf To: help-guix@gnu.org Subject: How to use receive in a phase? Message-ID: Mail-Followup-To: help-guix@gnu.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fqtSk4R+K1DVr8wn" Content-Disposition: inline Received-SPF: none client-ip=37.205.8.62; envelope-from=ws@wolfsnet.cz; helo=wolfsden.cz X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -10.24 X-Spam-Score: -10.24 X-Migadu-Queue-Id: C93106718A X-Migadu-Scanner: mx13.migadu.com X-TUID: Jz1iEXUTSzcb --fqtSk4R+K1DVr8wn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I am trying to use receive in a phase, but for some reason it fails. I mod= ified the hello-world example from the cookbook to demonstrate: (use-modules (gnu) (guix build-system gnu) (guix download) (guix licenses) (guix packages)) =20 (package (name "hello") (version "2.10") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/hello/hello-" version ".tar.gz")) (sha256 (base32 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))) (build-system gnu-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'unpack 'xxx (=CE=BB _ (use-modules (ice-9 receive)) (receive (a b) (values 1 2) (pk a) (pk b))))))) (synopsis "Hello, GNU world: An example GNU package") (description "GNU Hello prints the message \"Hello, world!\" and then exits. It serves as an example of standard GNU coding practices. As such, it sup= ports command-line arguments, multiple languages, and so on.") (home-page "https://www.gnu.org/software/hello/") (license gpl3+)) Now when I try to build this package, I get this error: starting phase `xxx' error: in phase 'xxx': uncaught exception: unbound-variable #f "Unbound variable: ~S" (a) #f=20 phase `xxx' failed after 0.0 seconds Backtrace: 11 (primitive-load "/gnu/store/x57gb3dj0cvvpzmy9r2nh32fcnn=E2= =80=A6") In guix/build/gnu-build-system.scm: 908:2 10 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1752:10 9 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 634:9 8 (for-each # =E2=80=A6) In ice-9/boot-9.scm: 1752:10 7 (with-exception-handler _ _ #:unwind? _ # _) In guix/build/gnu-build-system.scm: 929:23 6 (_) In ice-9/eval.scm: 173:39 5 (_ #(#(#) (# # =E2=80= =A6))) 182:19 4 (proc #(#(#) (# =E2= =80=A6))) 142:16 3 (compile-top-call # = =E2=80=A6) In unknown file: 2 (%resolve-variable (7 . a) #) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) =20 ice-9/boot-9.scm:1685:16: In procedure raise-exception: Unbound variable: a Would anyone have any idea what is wrong and how can I correctly call funct= ion returning multiple values in a phase (call-with-values is bit... unwieldy)? Thank you, Tomas Volf --=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --fqtSk4R+K1DVr8wn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmU9tDsACgkQL7/ufbZ/ walzoA/9FfEUhjCqHYtn03yBZkWx+Cq5PcOa3nZ2cphaHyNMjxksKi88fgb2n3NC Dn1zGIA79N8dOAY3XIR+GPqaPBcoMbv1BeZ1jQYcd0wY7YMXoJTmk9dMNRGGm9ya NU/NzD+rLKTxJs1jVGXam535yw0ukpnRDzuBI+doIyO/QrlGYaVHi2c55g8RtrSf XE1WP/9boQfiEvN1nxdz07Jpa6sJqYX/PBQ3TyrCIl8jPcCjg66bgB/pGj8QGfuJ 2uQvQ1d051IrqPl6nGEVgs7TOrqUOgyW7kSMUR10AT2ALAyahd9mUR8evka0QeXr AkafQNWm2HaDCPoidq68xgowN09Q9A4LaCNxbdNwfE7VLHjLJbnYm+0EXp5IR6J7 WhHdoJ7eCTJQ6ZuMBidKn2djrpl5wAf4Hj9YVO2n0rf6LBNNmevTv3W/z7AmRnfh lA4j7+8xQp/xP/XTGz21gOc9F57uPfVltDj7eJ5NscEAM4UUD+kiXolMK65DUzrh zbQqH6mzTGyCtWUp2Tamz0JzzR/Jk2fd/gjjjSqoS4b31oLrTD7hhlEgCMJdtE/F d5oscSzEwGYyGP61ElW87bIhHKJRCx89E896B0Z4OnButt90TdiBN+grw4MHwmKJ k5+rP0KvpDZ7i/Ylzd2c2Vrc3k23exyVKpwCuwQ0kwFAqzfYr/c= =kp7w -----END PGP SIGNATURE----- --fqtSk4R+K1DVr8wn--