From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UF7XGmwjimOMvwAAbAwnHQ (envelope-from ) for ; Fri, 02 Dec 2022 17:10:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cJvFGmwjimOnjwAAauVa8A (envelope-from ) for ; Fri, 02 Dec 2022 17:10:20 +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 0808FD08D for ; Fri, 2 Dec 2022 17:10:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p18bh-0006s9-2B; Fri, 02 Dec 2022 11:09:45 -0500 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 1p18bf-0006rR-84 for guix-devel@gnu.org; Fri, 02 Dec 2022 11:09:43 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p18bd-0003F2-6w; Fri, 02 Dec 2022 11:09:42 -0500 Received: by mail-wr1-x42b.google.com with SMTP id z4so8517315wrr.3; Fri, 02 Dec 2022 08:09:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=r9N3/nNMjawF6Pep66B7asdWia36I/p8aiBuqOqDUBI=; b=PhVUKl/VJe5u/5bKJ+paga//pb0mnIcIyk3au7r8th4QHid5Bjdc2UtTaLkNK7wHTC dHvGL87ZvYPZqvrueXaVg5ghA0WSE3v6zLx67MWkC4qdhKMYpChtc1TpJz9MusLrCLeu TL1j/49WPhp3KnK0TfPQHOxWRQHUCKTsze58/wEOHXdSWS8m1jvjnE38/1AxejUw5KnU 7SNrU+6aaPpc9gOxley1rfZrM/x6j3wWiIZ6mhMO9DpvjN+RVcN1nUXXtgPwRqahPam6 O5BKO6plBwKq+ARyTXvD1dxuGFhubRFTg6NSFF3NohitMqkyFvSnb0g01UrkffmPUEiq 8PAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r9N3/nNMjawF6Pep66B7asdWia36I/p8aiBuqOqDUBI=; b=YeBJ30TLdU95kvArxsl0f5P5/CPTEcnhVB27I3JE8y9ErKdiBC4PrHfwUkgZyLS+dC AKfqnAhrU7NvoTncjfuoWOeuZaBrUPOP8i+mNj2jBBIbWAQGMEKQbUUqlzWSVlG7C1so FcR6RN6poi+0rBx2jL8IKbbxGQVRZfznx9YE8YdWy8g7pKJGPy249tV6wIWCXxMYJiF9 SxmFVnJIQwAq7HRhjJvhulKNc6w7qunR0tQWWluLFKjXVmP60DH/qJgicLpqB1wOiG9k Tu7wbrE71cJRK55RNZaZzyiT5qWi+spT1XhkozP9ukhAp871WJoSXsThg4o5a5jJmySz kMog== X-Gm-Message-State: ANoB5pkmVD2LOwXZ8WfOD/Z5B3HFeId3/KNKAdfF5Juh5tkEzGoDsVE6 qv6F8nd2Pbkj8ICUZz3VjbFmzqRIX0A= X-Google-Smtp-Source: AA0mqf5sA/q5Q7le1qCH/Cke4+phoiGnPRydgvMkqtscjLNycYpsRNn76VcoopVol8c2ghm0VoV+fw== X-Received: by 2002:adf:f5c3:0:b0:242:3427:bb51 with SMTP id k3-20020adff5c3000000b002423427bb51mr6014003wrp.635.1669997378256; Fri, 02 Dec 2022 08:09:38 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id p1-20020a5d68c1000000b002420fe50322sm7252835wrw.91.2022.12.02.08.09.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 08:09:37 -0800 (PST) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: "(" , Guix Devel Subject: Re: Help with G-expression In-Reply-To: <87sfhyuq7t.fsf@gnu.org> References: <86359zm3iv.fsf@gmail.com> <86v8mvklcd.fsf@gmail.com> <87sfhyuq7t.fsf@gnu.org> Date: Fri, 02 Dec 2022 14:19:26 +0100 Message-ID: <87cz92rli9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669997420; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=r9N3/nNMjawF6Pep66B7asdWia36I/p8aiBuqOqDUBI=; b=PyPL+j3S2CiEyYJjZcPsLC8iqtpPfBsxBCPZhsDtEjtJbP2WX7/wUm701NLpiZJYNJum+3 HMIqzte+tXtbO0aRwFcMeCTGowo88YVC96BO2GmpQv3f+K8ChqdioGSTILyueRmDU7Y8Dl lPi0shtVU4ss7qwjZrezUTD9qUKn+QVs20fKs0Hb+lQQTOUVW9WXjhd7ILSWM2zayBOa3U N7aKFbKTcyYLjKEWXFlI+bmrScO0bnsC1PL+/VRncM4rj3YVq9tLlMVt++xxjgPhBn4Sov UtynTEO7bZJ6y6Fld3uRh03HxxW23BrI4q9rPih8fkeCoIDOqNYnHGl9PNiP2g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669997420; a=rsa-sha256; cv=none; b=gZOw99GKnJ7Wg/20qFPPqBpJu6HbcFU9V8rqncDSlbu3x3cWLOJOhut9ssYbVJocvzGEJ5 DU6LjfejN6ze1rAbCni4CMGsSRzBSvL8/OYX0zWUIZMiN0HLcUgAiCuD8mtBvE4+H0CM8y 1hYqhamvwCjIVrxm8unCDCnun+SJAP7nDLF/Rx3DngsU6b/XkjBDK8qb4Vrg5Z/CWRghzQ PFtHN+FSLipIAW7MOkQK83dalHBWr0jPApapIlvTAiuLzXmB5Ujc1QwnkcBWXr6lJrtzFs CcVWZNmUZKng2kRAddz1xaFd9SDsfaorO7YlAR2AyEiqZqATmhWuVw2PJ4HuUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="PhVUKl/V"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.27 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="PhVUKl/V"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0808FD08D X-Spam-Score: -7.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: HG1SXBS0wPop Hi Ludo, On Fri, 02 Dec 2022 at 10:09, Ludovic Court=C3=A8s wrote: > zimoun skribis: > >> no code for module (guix config) > > (guix config) is added by using =E2=80=98make-config.scm=E2=80=99; there= =E2=80=99s an example in > (gnu services base). > > For the rest, make sure to use =E2=80=98source-module-closure=E2=80=99 or= you=E2=80=99ll miss > modules (info "(guix) G-Expressions"). I have read this section. :-) Something is not clear for me. Note that =E2=80=99make-config.scm=E2=80=99 does not appear in the manual. The only difference between the previous =E2=80=99work=E2=80=99 example and= all the =E2=80=99fail=E2=80=99 as =E2=80=99fail-again-not-fixed=E2=80=99 is only th= e part =E2=80=99with-imported-modules=E2=80=99. Well, I am somehow surprised how difficult is to find the correct. --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> (define (fail-again-not-fixed) (with-imported-modules (source-module-closure '((guix build utils) (guix config) (guix profiles))) ;import it (computed-file "empty-tree" #~(begin ;; Put it in scope. (use-modules (guix build utils)) ;; Happily use its 'mkdir-p' procedure. (mkdir-p (string-append #$output "/a/b/c")))))) scheme@(guix-user)> ,build (fail-again-not-fixed) While executing meta-command: Throw to key `match-error' with args `("match" "no matching pattern" (#:dec= larative? #f #:export (%guix-package-name %guix-version %guix-bug-report-ad= dress %guix-home-page-url %channel-metadata %system %store-directory %state= -directory %store-database-directory %config-directory %gzip %bzip2 %xz)))'. --8<---------------cut here---------------end--------------->8--- Here it is the same error as =E2=80=99fail-again=E2=80=99. And I do not un= derstand the magic invocation. Well, what I tried next: --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> (define (fail-again-bis) (with-imported-modules `(((guix config) =3D> ,(make-config.scm)) ,@(source-module-closure '((guix build utils) (guix profiles)) #:select? not-config?)) (computed-file "empty-tree" #~(begin ;; Put it in scope. (use-modules (guix build utils)) ;; Happily use its 'mkdir-p' procedure. (mkdir-p (string-append #$output "/a/b/c")))))) ;;; : warning: possibly unbound variable `make-config.scm' ;;; : warning: possibly unbound variable `not-config?' scheme@(guix-user)> ,build (fail-again-bis) While executing meta-command: error: make-config.scm: unbound variable scheme@(guix-user)> ,use(guix self) scheme@(guix-user)> ,build (fail-again-bis) While executing meta-command: error: not-config?: unbound variable scheme@(guix-user)> (define not-config? ;; Select (guix =E2=80=A6) and (gnu =E2=80=A6) modules, except (guix conf= ig). (match-lambda (('guix 'config) #f) (('guix rest ...) #t) (('gnu rest ...) #t) (rest #f))) scheme@(guix-user)> ,build (fail-again-bis) substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% building /gnu/store/xjvjrkl3559jrlm0bnvdj29c838y81x3-config.scm.drv... building /gnu/store/slwgyy4vnxprz0cj73vyq6psr7bqmbwz-module-import.drv... building /gnu/store/cfjpfzph97dsishvr7g1bqxqw5kynns8-module-import-compiled= .drv... 20% [############################# = = ]builder for `/gnu/store/cfjpfzph97dsishvr7g1bqxqw5kynns8-module-impo= rt-compiled.drv' failed with exit code 1 build of /gnu/store/cfjpfzph97dsishvr7g1bqxqw5kynns8-module-import-compiled= .drv failed View build log at '/var/log/guix/drvs/cf/jpfzph97dsishvr7g1bqxqw5kynns8-mod= ule-import-compiled.drv.gz'. cannot build derivation `/gnu/store/pr3qqw26jilyhyn650i3w7z13i7k6p40-empty-= tree.drv': 1 dependencies couldn't be built While executing meta-command: ERROR: 1. &store-protocol-error: message: "build of `/gnu/store/pr3qqw26jilyhyn650i3w7z13i7k6p40-empty= -tree.drv' failed" status: 100 --8<---------------cut here---------------end--------------->8--- =20=20=20=20=20=20 Below the log file =E2=80=93 missing (gcrypt hash). Well, I give up because the try-error does not explain me how it works. :-) Any pointers? Cheers, simon --8<---------------cut here---------------start------------->8--- [ 1/56] Loading './guix/base16.scm'... [ 2/56] Loading './guix/base32.scm'... [ 3/56] Loading './guix/base64.scm'... [ 4/56] Loading './guix/build/syscalls.scm'... [ 5/56] Loading './guix/build/utils.scm'... [ 6/56] Loading './guix/build-system.scm'... [ 7/56] Loading './guix/colors.scm'... [ 8/56] Loading './guix/combinators.scm'... [ 9/56] Loading './guix/config.scm'... [10/56] Loading './guix/deprecation.scm'... [11/56] Loading './guix/derivations.scm'... ;;; Failed to autoload make-zlib-input-port in (zlib): ;;; no code for module (zlib) ;;; Failed to autoload make-zlib-input-port in (zlib): ;;; no code for module (zlib) ;;; Failed to autoload make-zlib-output-port in (zlib): ;;; no code for module (zlib) ;;; Failed to autoload make-zlib-output-port in (zlib): ;;; no code for module (zlib) Backtrace: In ice-9/boot-9.scm: 3556:26 19 (_) In unknown file: 18 (primitive-load-path "guix/store" #) In ice-9/eval.scm: 721:20 17 (primitive-eval _) In ice-9/psyntax.scm: 1230:36 16 (expand-top-sequence _ _ _ #f _ _ _) 1222:19 15 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) 259:10 14 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?) In ice-9/eval.scm: 293:34 13 (_ #) In ice-9/boot-9.scm: 3409:4 12 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?) 3422:24 11 (_) 222:29 10 (map1 _) 222:29 9 (map1 _) 222:29 8 (map1 _) 222:29 7 (map1 _) 222:29 6 (map1 _) 222:29 5 (map1 (((guix monads)) ((guix records)) ((guix #)) (#) ?)) 222:29 4 (map1 (((guix records)) ((guix base16)) ((guix #)) (#) ?)) 222:29 3 (map1 (((guix base16)) ((guix base32)) ((gcrypt #)) # ?)) 222:29 2 (map1 (((guix base32)) ((gcrypt hash)) ((guix #)) (#) ?)) 222:17 1 (map1 (((gcrypt hash)) ((guix profiling)) ((rnrs #)) # ?)) 3329:6 0 (resolve-interface (gcrypt hash) #:select _ #:hide _ # _ ?) ice-9/boot-9.scm:3329:6: In procedure resolve-interface: no code for module (gcrypt hash) --8<---------------cut here---------------end--------------->8---