From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id OARRLL5DzmUSzwAAqHPOHw:P1 (envelope-from ) for ; Thu, 15 Feb 2024 18:02:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id OARRLL5DzmUSzwAAqHPOHw (envelope-from ) for ; Thu, 15 Feb 2024 18:02:54 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=g0pq256W; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708016574; 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: 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=XpaXN1BokbBJ3Xr/9PR3fu3xq6Khe4FVI+pEEPwoJAY=; b=ia0KMt4vau4JCIdzQ4IHQrglEajW5tnURY7nFg6JJNGPh3/Y/92auYnmqRTmXBvEQP6EQV H5ROFwb7Po9dHFJ4vdS20e6CmokpTpnd1Ctbv9S7YQ4f5eLE+Q8ZtLi2mq4KOS+3cFJ31T 8/3egHt4NkI0oc0MpaNRM9CVPeZJJfDkt/XhgmoZ07y5+ITaY7k6NKUyaEqkAHSWoWoFyx F9y7CzxnEmnHI0Epdjv8u0N6iVT6pUFfyCuiEOipHcQ0q1TDs0Ltpdz8gWutXRMJ7q+c8k 2EM4nR7Vz1SrSDgID+qWqgEaBMcsssp4WzG6Yw5Ms3FnYUXlJ90uz02zO0Wbzw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=g0pq256W; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708016574; a=rsa-sha256; cv=none; b=Tf/tEUKmr0AZjcKW/45BbfdBiq+d7DsltVJh4l6htbN1GnShM971iWjYObIuRFvDBdCyx8 NsfqrZFvCCiQO68dhnCrvwhaB78DvgptQ4ghp37JRwG5eCPJ1jAd3UIoLhdFpiUU48V04K NJipfCLNRrnf22W4JjoJCA+z/XD0YIaQHVxrZyAPIZTehnffhCY+tphy20AUUM5RoC7Ukf PGMFKBadDi4WwI67WYx34lFym1nguGK1imROjw5IpAw0b058llU5vBx5WsWG1lwP1ovXEF Z9f+kcpuunRioP0u3BI8a+ci5EVWXnxGFx8NktS9jm/AsmQsX9qL/lw0Em5+dg== 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 9F08174B32 for ; Thu, 15 Feb 2024 18:02:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raf6f-0008Ex-7P; Thu, 15 Feb 2024 12:01:05 -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 1raf5t-0007lF-Eh for help-guix@gnu.org; Thu, 15 Feb 2024 12:00:23 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raf5r-0007jg-N0 for help-guix@gnu.org; Thu, 15 Feb 2024 12:00:17 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-411b3f85d4eso2808095e9.0 for ; Thu, 15 Feb 2024 09:00:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708016414; x=1708621214; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XpaXN1BokbBJ3Xr/9PR3fu3xq6Khe4FVI+pEEPwoJAY=; b=g0pq256W/t1o31rvyf8FQI/sfqv6yRwVTAq9szy3Zd3a4IVQINlvHDhFiXtKHL6Spd y5e+EuZfWLBY0eONo3FzW9uWb0CsIZp+j1/MfBAHbQAQ99HigwS+kwjkHXZvOZsGlnVu SsKdUo3kLWh89TKqLr8TBZ/DvKlo0euy8r54+Pj4zL9yp0Paw9Ee5lvXc9mzNafTwasd eIUEkpq7Ne7iqMHhomaBggJSvarF4zfQHNVqMSl/faxASwLgJ5J976MIMwMoOcmIT6ZI e6pighNlZwOFA1EFSvMpUlIOafcgTFBBzpWkJdsfirjOyLb1IKA4KGrI/eb06ExECkyU he0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708016414; x=1708621214; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=XpaXN1BokbBJ3Xr/9PR3fu3xq6Khe4FVI+pEEPwoJAY=; b=pFHrIiXiDKeBe5B2/15GKyMXDZs3zk7br6ik02gzFKSTGsK8230CcbJE+zhquY8jqL 8jrLbvBuQ23i0ttLCoUJVfZhQjbg5N8+qH8z/mvKoHwysaCR2m0ZBr6mAbqG6kPXtWPY gnnPdaaMt4ByGR6ijIwRbJgKBDVa6274aSWn12yQTIhKzrdjCxJf6CS2sHFLMwcuQq6h a8CwYPJRbRoYyZUjR1irwfup/uQ1xZrgHRf+Ue5DxrCIU7KXWG6uYrfTpk64ouSV0K2E mcOMMp1WsVW51+FsCHunw1dQbG4ZEroMlqinlvdMV6gvpP5/ofcyyYt/nyu8ZtIlDUs+ nP2g== X-Forwarded-Encrypted: i=1; AJvYcCUBaLUlVhjk8iKJNQXsoEB9V1U6q60dxALqd55GlCwXsXsAMz3zBehfSZp43+CFLEfAgwrB8/8LrMYzNrbiyPOL2Q== X-Gm-Message-State: AOJu0Yw37HvvjPlvT0iyo7gw7Wq93UV6kyleJvgyEp49HEK4+VYQ6yHH RAieE4e5m6iVc+xSsMM/twIiliEpa0Qrbjs+YtYANvB54AEiu6fYrprpFACX X-Google-Smtp-Source: AGHT+IFgVCO5CoAtNL8X7wii217vgiDph9qu+0MuQDRbsMGHTdQYP05RsguZW52k0cih9NvmXmKXBQ== X-Received: by 2002:a05:6000:1e14:b0:33c:da80:fb17 with SMTP id bj20-20020a0560001e1400b0033cda80fb17mr2130980wrb.0.1708016414317; Thu, 15 Feb 2024 09:00:14 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:7d85:9c0b:111:5112]) by smtp.gmail.com with ESMTPSA id az7-20020adfe187000000b0033d01fe1f04sm2389189wrb.55.2024.02.15.09.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 09:00:13 -0800 (PST) From: Simon Tournier To: Alexander Asteroth , help-guix@gnu.org Subject: Re: why does '-e' work differently in guix shell and guix package? In-Reply-To: <878r5h5j4w.fsf@h-brs.de> References: <878r5h5j4w.fsf@h-brs.de> Date: Thu, 15 Feb 2024 17:47:12 +0100 Message-ID: <87sf1t65f3.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::32a; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32a.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -8.78 X-Spam-Score: -8.78 X-Migadu-Queue-Id: 9F08174B32 X-Migadu-Scanner: mx11.migadu.com X-TUID: 0s2d9mDvoXD3 Hi, Well, I have missed if there is a reply. In case not. :-) On mar., 26 d=C3=A9c. 2023 at 11:48, Alexander Asteroth wrote: > When I do > ``` > $ guix shell --network --container --emulate-fhs bash coreutils -e=20 > '(list (@@ (gnu packages commencement) gcc) "lib")' > ``` > I get a shell, that has `libstdc++.so.6` in `/lib`. > > But when I do > ``` > $ guix package -e '(list (@@ (gnu packages commencement) gcc)=20 > "lib")' > guix package: error: expression "(list (@@ (gnu packages=20 > commencement) gcc) \"lib\")" does not evaluate to a package > ``` > I get an error. Why is that? That=E2=80=99s because =E2=80=9Cguix shell=E2=80=9D relies on =E2=80=99read= /eval=E2=80=99 and =E2=80=9Cguix package=E2=80=9D on =E2=80=99read/eval-package-expression=E2=80=99; both defined in the module = (guix ui). As you see, --8<---------------cut here---------------start------------->8--- (define (read/eval-package-expression str) "Read and evaluate STR and return the package it refers to, or exit an error." (match (read/eval str) ((? package? p) p) (x (leave (G_ "expression ~s does not evaluate to a package~%") str)))) --8<---------------cut here---------------end--------------->8--- =E2=80=9Cguix package=E2=80=9D expects that the expression returns a =E2=80= =99package=E2=80=99 when it returns a list. Well, indeed it seems inconsistent and =E2=80=9Cguix package=E2=80=9D could= be updated to also just use =E2=80=99read/eval=E2=80=99. Cheers, simon