From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wD7oMUbsiGOvLQAAbAwnHQ (envelope-from ) for ; Thu, 01 Dec 2022 19:02:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8OL1MUbsiGOamgAA9RJhRA (envelope-from ) for ; Thu, 01 Dec 2022 19:02:46 +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 6AD6130AAD for ; Thu, 1 Dec 2022 19:02:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0nsV-0003yI-B9; Thu, 01 Dec 2022 13:01:43 -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 1p0nsU-0003y9-B7 for guix-devel@gnu.org; Thu, 01 Dec 2022 13:01:42 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0nsS-0004Aw-GR; Thu, 01 Dec 2022 13:01:42 -0500 Received: by mail-wm1-x334.google.com with SMTP id m7-20020a05600c090700b003cf8a105d9eso2236392wmp.5; Thu, 01 Dec 2022 10:01:38 -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:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8bIgV+SaoQD5EMspWHRIx6LLZHfS+e0+UCeCXwTp07U=; b=TCZpVugJhSlIsMfz4nR1Xt7A15IzW1AbNcmaVRtjQnzwQi7FjEGN8NStazd+syb85Q XznK/1+JWgT5N7FwTstsAQG/koDG72Z/55w0rllB/XPbqalWOTAHnhVmxOQy6506Ejdp ipi6yJq7M8AYJqqs724rw2+jkOjjz9fcm9wyUSbRmzvYsih6rc1pJ/S/9Re5gdPcsLp7 rxFh7KnMbGIXwli4AH7jfKVCD9BOMp1NezhlXDt7hWTjXNZYv13bBeaQ7cQtMvhFms/1 SfNWbJXv/nweNMK/kd2kpw1qrGKa3iReq5D1TNA3BH2QZN6X+IRlvuKia2fEwQhO4qb9 FZAQ== 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:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8bIgV+SaoQD5EMspWHRIx6LLZHfS+e0+UCeCXwTp07U=; b=iw4vsVFyH3nPsxsQekIrwoqfH6Vq6asLZj1CW2leCfjhm06pB+BWcsO1amnSqyAKd1 0TZW79qJaA8LBUhhB7xMqjea4dCRHpa9W9wmhtHViSFS1hm96EZQ9XYXz8RmKC5mB4Dz fSanZb4SRq6lLFGSGyRj1qdMRZcWpU5tMpWEHIjUpZkVEgMvUOnSp/KGf5dmfS8uNrBE AVt0XnGLMl1tR5mm8xPswWzriEoX1bN9iBU7gPxHTgDfwCIU0J8mXM2/A+0aHXJFO8dI 8JjXWIpjBiYDZMXyxdQm5911chUpDDuytQjDc7ak/dAvwDhMYhC/6fMyYE06VCMBabv2 njQA== X-Gm-Message-State: ANoB5pm6aia4VemubIWQY2FLxTNR8bH5Bd6UXJOVGNcJ3n9Jgw+Ey9Al /nefrOUfhDWbUbfOUU8jUA1ctdQEdFo= X-Google-Smtp-Source: AA0mqf59mhOurRn0Vl84PX3OtcJhrY99d714nEP2HpUX23cJe1L00a4eoXIcnsH4uEJe5ykGwruwTA== X-Received: by 2002:a05:600c:3c91:b0:3cf:6f23:a3e3 with SMTP id bg17-20020a05600c3c9100b003cf6f23a3e3mr3085695wmb.1.1669917697003; Thu, 01 Dec 2022 10:01:37 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id s16-20020a7bc390000000b003b476cabf1csm6446033wmj.26.2022.12.01.10.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 10:01:36 -0800 (PST) From: zimoun To: Guix Devel Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Help with G-expression Date: Thu, 01 Dec 2022 18:34:32 +0100 Message-ID: <86359zm3iv.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::334; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x334.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-TUID: VK5H3k++vqod Hi, Trying to make a Guix script for extracting BigBlueButton videos =E2=80=93 = the ones from Caf=C3=A9 Guix for instance =E2=80=93 I am very puzzled by G-expr= ession. Well, I am trying to adapt this one [1]. But I am failing=E2=80=A6 The manual has this example [1], --8<---------------cut here---------------start------------->8--- (with-imported-modules '((guix build utils)) ;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"))))) --8<---------------cut here---------------end--------------->8--- Which I turn into a function, and from =E2=80=9Cguix repl=E2=80=9D --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> (define (work) (with-imported-modules '((guix build utils)) ;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 (work) $1 =3D "/gnu/store/d8psk7dsczqj65sc8bqigpi6ffhd0wvn-empty-tree" --8<---------------cut here---------------end--------------->8--- where =E2=80=9Ctree /gnu/store/d8psk7dsczqj65sc8bqigpi6ffhd0wvn-empty-tree= =E2=80=9D shows the tree a/b/c. So far, so good. If instead, I just add the module (guix profiles), then it fails. --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> (define (fail) (with-imported-modules '((guix build utils) (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) 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/g1jbxhhz4b7zcyixhy4vw13brn2fncia-module-import-compiled= .drv... 50% [#################################### = ]builder for `/gnu/store/g1jbxhhz4b7zcyixhy4vw13brn2fncia-module-import= -compiled.drv' failed with exit code 1 build of /gnu/store/g1jbxhhz4b7zcyixhy4vw13brn2fncia-module-import-compiled= .drv failed View build log at '/var/log/guix/drvs/g1/jbxhhz4b7zcyixhy4vw13brn2fncia-mod= ule-import-compiled.drv.gz'. cannot build derivation `/gnu/store/ln5yb7lvdknr3azc5zh2m3239adgmsjj-empty-= tree.drv': 1 dependencies couldn't be built While executing meta-command: ERROR: 1. &store-protocol-error: message: "build of `/gnu/store/ln5yb7lvdknr3azc5zh2m3239adgmsjj-empty= -tree.drv' failed" status: 100 --8<---------------cut here---------------end--------------->8--- Well, the message is not really helping. :-) Then, because I am not sure to fully understand the difference, let add =E2=80=99source-module-closure=E2=80=99. --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,use(guix modules) scheme@(guix-user)> (define (fail-again) (with-imported-modules (source-module-closure '((guix build utils) (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) 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--- Ah, another message. Not helping either. :-) What do I miss or am doing wrong? 1: 2: https://guix.gnu.org/manual/devel/en/guix.html#Build-Utilities Cheers, simon