From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 065EA214A2; Sun, 02 Nov 2025 12:04:11 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 635B021469; Sun, 02 Nov 2025 12:04:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) by atuin.qyliss.net (Postfix) with ESMTPS id BF8D12149B for ; Sun, 02 Nov 2025 12:04:07 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id B087B7A010E; Sun, 2 Nov 2025 07:04:05 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Sun, 02 Nov 2025 07:04:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1762085045; x=1762171445; bh=RMnHY2tsjD kLPzP2X/95zYKeA6ZKQGV5XuXYMywXt9M=; b=CF1yRGvk85avbNeoleQK4pMrX0 zvC33S6AlQtPczjkAV7FiBRbgYvhoMnjdqdPT85mZWZpxAbsCBxvW8HFTVctwswm jsZPrPIKOsUWw6sUcQ66+cjghcqNG05yIN2Yg/mZoDcelxBQQ9QsuAafbkP51GaI om/3uh0luvbSNPAUNulTvEMy/yG1sbJTMdGfhPRRitmPxD9py+xEdgn9kjpWqtWH 5GimxjPPKc7ZnJ4dgfB5gLqhv0Dqt8N9kU0cjHolsg9zeukYoONLQsHqP3UrLxpn ujrSa6EkKbcjCC3PEA+9p4K0Q4hr1u4IywWy3SiB6jyNHefAQpxq9vfxcxaA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1762085045; x=1762171445; bh=RMnHY2tsjDkLPzP2X/95zYKeA6ZKQGV5XuX YMywXt9M=; b=Luu/1vbhgfQaSRjlrV0CcRgdIdkJzwooO0Wqw64m1qLWPG8nqXy Ut5/1qWSzgXwQz66GSwwEALXHTs/oLaOv6hmqtEorzAzMGCdng213OjyR8GRbOyh kNHVenxsLep84ehrQqx7+QkmTVYFyZFoHWNG6rbAj4sANhJaEv5AtDavUCn8gUXv ZKhsoDgmsnGtc7olM46nagi7UaNKfd2myyX3pK75zCe48f+9naYEEqBSvxaRmm71 MTrIwuESEu6v9DOj1UOv/jcsy/TULUe3/kj5pl7jIByXuDfo8LMunBxsei4RJASg /ugsaCazHOdITW3OzA33aQT7DGtPd9PzpHw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddujeehvddtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepudffieeule dtheevheefieetveevfffhvddutefhiedvgfehiedtfeefleevgfdunecuffhomhgrihhn pehsphgvtghtrhhumhdqohhsrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrihhspdhnsggprhgtphhtthho pedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeguvghmihhosggvnhhouhhrse hgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhesshhpvggtthhruhhmqdhoshdr ohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 2 Nov 2025 07:04:04 -0500 (EST) Received: by mbp.qyliss.net (Postfix, from userid 1000) id E593E63AB816; Sun, 02 Nov 2025 13:03:58 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour , Spectrum OS Development Subject: Re: Is builtins.readFile okay? In-Reply-To: <630be45c-86d7-4308-a262-d0bf9ef8ac8b@gmail.com> References: <878qgqq6yg.fsf@alyssa.is> <630be45c-86d7-4308-a262-d0bf9ef8ac8b@gmail.com> Date: Sun, 02 Nov 2025 13:03:58 +0100 Message-ID: <87seewpro1.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: SR2CIQRLLMAWDBLR67ERG2JEQKZH5UNL X-Message-ID-Hash: SR2CIQRLLMAWDBLR67ERG2JEQKZH5UNL X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 11/1/25 08:21, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> Is it okay to use builtins.readFile in a Spectrum derivation? If the >>> input is a store path that is Import From Derivation and discouraged, >>> but I don't know if Spectrum's sources will ever be in a store path. >>=20 >> That wouldn't be a problem. readFile is fine in principle, although it >> is rarely what you actually want. There are very few cases where you >> have a string you need at eval time but don't want to inline into a Nix >> file, so if you're reaching for readFile I'd take a step back and think >> about whether there's a better approach. >>=20 >> Where readFile is used in your sysupdate VM, the build configuration >> mechanism[1] might be a better fit, if you don't want to hardcode it. >>=20 >> [1]: https://spectrum-os.org/doc/development/build-configuration.html > > readFile is used only to read the version number. and update-url, which is what I was thinking more about. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaQdIrgAKCRBbRZGEIw/w olbYAQCnyKKT1j5i1hKo5Lpb1UmI+AixaVeNLXvRaooYVweKOgEAxfbed4fp1Q// yyXuFsto6v4b8QD8XsWxtyJKqKoqcAo= =5jWF -----END PGP SIGNATURE----- --=-=-=--