From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id dXeYA8Kw4mFtGQAAgWs5BA (envelope-from ) for ; Sat, 15 Jan 2022 12:32:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qPNoN8Gw4mGNAAAAG6o9tA (envelope-from ) for ; Sat, 15 Jan 2022 12:32:17 +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 AEB123B0CF for ; Sat, 15 Jan 2022 12:32:17 +0100 (CET) Received: from localhost ([::1]:58644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8hI8-0001MN-TM for larch@yhetil.org; Sat, 15 Jan 2022 06:32:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8hF0-0001K4-UG for guix-devel@gnu.org; Sat, 15 Jan 2022 06:29:03 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21178) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8hEy-00061p-9M for guix-devel@gnu.org; Sat, 15 Jan 2022 06:29:02 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1642246127; cv=none; d=zohomail.com; s=zohoarc; b=A4SK0GOTc+seFk9VNSlxScWk+N8Wgr6PFuA5n1LtG4P9STzUhTWeXOckcU+q7HUswlpQ2vXaV1N4k0rlIoZhXG2MGLxMYibnOWW8k473HS4xYqdJbqKUjrQIEZ8BuIFT5/e3oOid9fhhF1jhkgYiePKqMheiAAUep2Hik77Xorc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642246127; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=82C7vdjJwJnBClhsP4AR3h5msKCk2MOdvbrnSlQ34c0=; b=AsLPTVsA8i7MCoB5i66TjRW1J42d0yDMcGwVay8Qf6poHvk5jRzZpM/AKA1MEpVVVZqAT5wmZzSDAFr7Fa6yIyTf2F7FqogiWxPVj9h4xa/LAm9Cp5ymN3HAfRAWHWHcCFpidX/ZDfEWs9bEQBavE3+46GbyvsjM8fi8vP4eJ+Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1642246127; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=82C7vdjJwJnBClhsP4AR3h5msKCk2MOdvbrnSlQ34c0=; b=Ghbz/5GvOA6J050D/agexksW/Wpj6Qw6ChZ2740gnvev4JAZ/VdV9w0e+8fYcYOR 1Apm2s38PjrZVaEeyVCeHs9AwSlh8MtE8XmkgUf5GWTt914CVQZCocunrD2pk/fXkaf r7/XdoQv3I6V3c1ZwWIdamGPzlZoUGk3kbRl9CZw= Received: from localhost (p4fd5a3f5.dip0.t-ipconnect.de [79.213.163.245]) by mx.zohomail.com with SMTPS id 1642246123047325.92839638393025; Sat, 15 Jan 2022 03:28:43 -0800 (PST) References: <20220115023047.GB14101@gac.attlocal.net> <875yqlxwqn.fsf@elephly.net> <20220115032429.GB16769@gac.attlocal.net> User-agent: mu4e 1.6.10; emacs 27.2 From: Ricardo Wurmus To: jgart Subject: Re: Caching The Python World: guix shell --container Date: Sat, 15 Jan 2022 12:25:28 +0100 In-reply-to: <20220115032429.GB16769@gac.attlocal.net> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <871r19xmoo.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642246337; 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=82C7vdjJwJnBClhsP4AR3h5msKCk2MOdvbrnSlQ34c0=; b=d8a4RiTAlMxZw39snCTTLu7uisLqnil+d5Dh1UhohU4CBn+K5O2KTmju0nQuz3/UhRqEj4 SGm+oH+viRqZpYy3l20gApg9hrlN3RPkkkqTQIB05Pe8lBgsLg8jcdQKfk61JdrE1iDkuh U+NkAaZW/cLaqKkv9mJtzQ/TCTVIdiuDEKgAv+f5G7fvOoTHWzdCZwwDi0s25ZKcqqiA4m NZ6SiC5z/0aI1uz8Thm89iaKjGQo0eQi8bInTc5szc2ABSJ+r7ZFU88usyQcQGl6wzI/LS cgPx+5wdBWv+zD7MKTM+RMfwHp0Xv5G34NMgvVrsL5pBxjcJvK7JziLG0PoMTw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1642246337; a=rsa-sha256; cv=pass; b=YBoFzTzmJnYsvYedsuHazVf486Tm41mXyaO+l91sxsTB6csGPeyP286lOBawDPwMyZbU0C FfYQLPRhMdEtcQECh2ukQigcndGgdv0oEVhhsjAfNgjbjlDyDtYGo0u3qdtItiX3ksG0ax vyolHSJ6fKMzJj+96kwqdtc+hS9vGSNvzS6OMcnQ105W7pcGNJ9VihvHY2uF0wfqNU5edL pI1vhVKVgz1DRmeHN/hrfULhomgmQXFA5NzH0yv2xP/7aawiDRmaJMNB6+5I8xvYK8MsoN g/4OpEnrvRCQyMWFT0lZaRj7KTaigzlzTv0e7vq19MqS+csIm3WzZzpYgMhxwA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b="Ghbz/5Gv"; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; 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: -4.82 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b="Ghbz/5Gv"; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; 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: AEB123B0CF X-Spam-Score: -4.82 X-Migadu-Scanner: scn1.migadu.com X-TUID: nTDBwKG7xpJ5 jgart writes: > On Sat, 15 Jan 2022 08:45:57 +0100 Ricardo Wurmus wr= ote: >>=20 >> jgart writes: >>=20 >> > Is there currently a convenient way to tell Guix to build "all python-* >> > packages" and cache them? >>=20 >> This should do it: >>=20 >> guix build --keep-going -e '\ >> (begin \ >> (import (guix packages) (gnu packages) (guix build-system python= )) \ >> (fold-packages \ >> (lambda (item acc) \ >> (if (eq? python-build-system (package-build-system item)) \ >> (cons item acc) acc)) \ >> (list)))' >>=20 >> This will build all packages with python-build-system. fold-packages is really neat. You can also add even more filtering here; by package name, by inputs, anything really. For example, the expression above will give you any package built with python-build-system, but this may be too much, as it includes Python 2 packages. It is just a fold, though, so all work happens in that procedure that is given the current package and the accumulator from past invocations of the procedure. The only important thing is that the procedure always returns a value for the accumulator. It doesn=E2=80=99t have to be a list either; it could be a hash table so yo= u can easily look up packages you=E2=80=99ve already accumulated so far and base = your decision on that, etc. --=20 Ricardo