From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GNd9LspCUmC6PgAA0tVLHw (envelope-from ) for ; Wed, 17 Mar 2021 17:56:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4DxPKspCUmBANwAAbx9fmQ (envelope-from ) for ; Wed, 17 Mar 2021 17:56:26 +0000 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 758FE1FD58 for ; Wed, 17 Mar 2021 18:56:26 +0100 (CET) Received: from localhost ([::1]:55378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMaPB-0005Rb-9F for larch@yhetil.org; Wed, 17 Mar 2021 13:56:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMaOo-0005QQ-7F for guix-devel@gnu.org; Wed, 17 Mar 2021 13:56:02 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMaOm-0003T7-2u for guix-devel@gnu.org; Wed, 17 Mar 2021 13:56:02 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 16A755C0003; Wed, 17 Mar 2021 13:55:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 17 Mar 2021 13:55:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm3; bh=9OlMzHAAFK/t+A6QO3zofRbO9M 0Mhf/UeocuaSgD4Fg=; b=Zo5Vyegikpffkam2Romyt0V5X4taDqd3tJaELw5HMJ VVNhAwj/QWPMNGAmfElxqcTJvQHk1UTcYTD8bSepN/jmXLLVVPDvcfh5KVergwWk 5uhZ82LOU7xTNXm1boI/FAV87eQ7s2MrhOs3CVz2WvjBtEQzcutmFiOuL1/nVhEo Yp7DWgyVfdNEcbD5SrGljJsWHKcYRyRQ1rSIA95z63X3ato1y3LQ1W0+FxOAsrmm tn7wcyhXzAF1D6nYi+eLi/VHe6mlYCbqKVnuNEcrnvKaQFCptwoKn4+ExXh07uVs E1oMc11Gppd/8S2eZxo0bL7iDzl3fujOQpPgcfG9F7lA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=9OlMzH AAFK/t+A6QO3zofRbO9M0Mhf/UeocuaSgD4Fg=; b=kYBJn5I9BKj7XSGzF/qAbl kvNN8hkNof4jjH3W32RBxVzlCYpZPU+keIj/+1w23dsV1J1ygdR8F2cnf5FfnGIp cvR3oR7otq27q+yBeImuGEzz2sjbIGuXYdFyz5KJbk6P8Vcf6rVzpzBQG1SVwBhR CEOYHogyYIEoYRwip6yo9WmDzexmof4P9YwahQhzb+UHwQLJJI5Xpz7YYbSx0FiA iaFiGmWDSu9DPmiZy0MGLMCyUpD0whenldvaXljnv3Jc94Wwggnn4KHKdVyoiy0E 0zBKeuruymNalR6F22Lrh83uodLGiyGLKzphnSRvq0HSg83B6D2862MBs/SojWzA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefgedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkgggtgfesthhqredttddtjeenucfhrhhomhepmfhonhhrrggu ucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvth eqnecuggftrfgrthhtvghrnhepgffhueffhefhueeghfdvuefgkeefgeduledtheevheek keefffdtheegjeejudefnecukfhppeekiedrvdegjedrgeekrdehkeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkohhnrhgrugdrhhhinhhs vghnsehfrghsthhmrghilhdrnhgvth X-ME-Proxy: Received: from ordinateur-de-catherine--konrad.home (lfbn-idf2-1-840-58.w86-247.abo.wanadoo.fr [86.247.48.58]) by mail.messagingengine.com (Postfix) with ESMTPA id 6F345240067; Wed, 17 Mar 2021 13:55:57 -0400 (EDT) From: Konrad Hinsen To: Guix Devel Subject: Finding the store path of a package Date: Wed, 17 Mar 2021 18:55:54 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=66.111.4.25; envelope-from=konrad.hinsen@fastmail.net; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616003786; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9OlMzHAAFK/t+A6QO3zofRbO9M0Mhf/UeocuaSgD4Fg=; b=j3jCcyFv/pMks9U47kIPUfVPdO0fp/1kbu+xNClPoQ2gq4xc6bWx7L1Igb2p2zO/vcFui1 n/k0jI7xAwVd5//xU10VdVDCRjT3+kObmBph5oIpmsazEZU/QyJP7Cx3qPu6FAYLArSl4r rt3ijhl4BNIuruFM9jg70HeffGAdllebZuBBgiwlTwY9iibJJBFd1/9MEKhl+tDJp9Hwqt 8M13VS1GmhwRvCc2iCgxedrMaViQipm2/A2BBnIvPMmfoEmQxOeGxcvySP+MqOn6UmsOjQ NHB+MHI7nl+PySEnS3ZAeGTpzmO3DxhW9D3XZfRAetxSORaiTceSm006EJjmeQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616003786; a=rsa-sha256; cv=none; b=XBZ7yUCt7kt0Gc73mVKb/qJNtC4+8eZ98mCDB3BDR2dcZYVtSpe+kWpvoyBA5kfBDk6rn4 x3k4Ymvciv90ntlAqXLTKCYnZtwZoNoHpsAI/tPxOUm0ubgkGt8X8KSS+OtlSlRj0+rHTW Y7MenkHU5WWeIJsy1+v4Jsi2+3T1w4R9WNZ80krDwbUTKSvaSA2hcsRABp1vw3wp53UzFC nU7nN0k5kWqM0FkiDblkFJhFXvTXVEiyLnUb2LS0A1og1PH6QvnPhKqaCw6UUyWEwLhHPZ p6CjBGh9CXy/A3CVpn+EKQoYma1oY8pBeQN73Gf2SBik1n2PumsEIu8XfQtdSA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fastmail.net header.s=fm3 header.b=Zo5Vyegi; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=kYBJn5I9; dmarc=pass (policy=none) header.from=fastmail.net; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fastmail.net header.s=fm3 header.b=Zo5Vyegi; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=kYBJn5I9; dmarc=pass (policy=none) header.from=fastmail.net; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 758FE1FD58 X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5aMoVi9gBgQh Dear Guix experts, I wonder if there is a straightforward way to find the store path corresponding to a package, assuming that the package actually is in the store. I don't care if it's done via the CLI or via Guile code. Use case: Looking at the files inside a package. What I do now is "ls /gnu/store/**", but that usually lists many variants of the package, and I don't know which of them actually is the current one. I came up with some Guile code that does the job: (define (store-path specification) (let*-values (((package output) (specification->package+output specification)) ((entry) (package->manifest-entry package output)) ((l-entry) (with-store store (run-with-store store (lower-manifest-entry entry (%current-system)))))) (manifest-entry-item l-entry))) but it also downloads/builds the package if it's not yet in the store, which is not what I want. In fact, I don't care what happens then the package is not in the store. Returning a non-existing path is fine, as is raising an error or returning #f. Another attempt is "guix package =E2=80=93-list-installed", but this works = only for packages installed in a profile. I am shifting more and more to on-the-fly environments, meaning that many packages in my store belong to no profile. Cheers, Konrad.