From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 AA+PB0YF4GH/VAAAgWs5BA (envelope-from ) for ; Thu, 13 Jan 2022 11:56:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id xN/3A0YF4GHHZAEAauVa8A (envelope-from ) for ; Thu, 13 Jan 2022 11:56:06 +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 CA33B4409B for ; Thu, 13 Jan 2022 11:56:05 +0100 (CET) Received: from localhost ([::1]:32934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7xm0-0004yu-Uo for larch@yhetil.org; Thu, 13 Jan 2022 05:56:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7xg8-0006bD-Qe for guix-devel@gnu.org; Thu, 13 Jan 2022 05:50:01 -0500 Received: from [2a02:1800:110:4::f00:18] (port=48228 helo=michel.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7xg5-00034U-Co for guix-devel@gnu.org; Thu, 13 Jan 2022 05:50:00 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by michel.telenet-ops.be with bizsmtp id iApt2600L4UW6Th06Apu9F; Thu, 13 Jan 2022 11:49:54 +0100 Message-ID: Subject: Re: using an SRFI that is not available in Guile From: Maxime Devos To: Attila Lendvai Date: Thu, 13 Jan 2022 11:49:46 +0100 In-Reply-To: <016ZZkL98oO5WENHC8_wYbCvQ45U44f9DsGA17V-MbMl3tz7I69UZlCB53g9SMyAXjzuRdPztbLr6XgmLwOOxeFeeliCM9KiGj2KFgRb4tc=@lendvai.name> References: <6vmHCdZdAWsjqvLgmVNEZclQ-JbdRJLfGzLNphX3EbevcslD-_TkMuHA1MwIylOfbe3DkDXYCbx5WT_Q44sC1Qed5MsBUg2xxZKhUbChGGs=@lendvai.name> <94d412c429288b265a22aedd8eff3b3aa35b32e8.camel@telenet.be> <016ZZkL98oO5WENHC8_wYbCvQ45U44f9DsGA17V-MbMl3tz7I69UZlCB53g9SMyAXjzuRdPztbLr6XgmLwOOxeFeeliCM9KiGj2KFgRb4tc=@lendvai.name> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Lkb7nopkkkiFE4w5siWQ" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642070994; bh=z8PkpficdKrdOhz/EtYU5lcy52wJLyEjrzUlymfHUMI=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=n/6ys6+DkpvBCDO3uGI23Hh0VoyIvOHp8o/7pCVLKGyb/8Ri5wWBoCjpvCl9uVJzn cyfJgEBnigZsXPPy0SXZenlpY6qQqwtmqa1Od3Yotw7Bi5WUhoMLzJITOZsUf4DUo6 kGOE6DC7WCuEt9zHU0xLURLVmW2NeuxSrOe7e8EtG5THEgLe4YhdQ1goeo6cItnn74 nUyIjAYousxOLlPb/9e0rgIifTOE6u7f/VIBBM1Pr+kjkSyYkcPbnbcZH97a6JSjwc t9zw38tHepaBqsw4wrrhIEpk17EcPHmGHapESThBD6UMtHqZJ32N4W0s/2Qe0juTnY c1Iet9O1QxXuQ== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:110:4::f00:18 (failed) Received-SPF: pass client-ip=2a02:1800:110:4::f00:18; envelope-from=maximedevos@telenet.be; helo=michel.telenet-ops.be X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 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=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642071365; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=z8PkpficdKrdOhz/EtYU5lcy52wJLyEjrzUlymfHUMI=; b=tZxCqIuSppTOhwOgGeypPNg4cFGDv2JBuKmVFgUEJrGlDrSFofiIg62FpV5VfEFSYO4QrX qoq9/9JbmQt3vlstoTWAVlRjDbjG+dvd3XpkxsoxfqVDfXublbnMYi+VixLIZtVW5jR7XS BShXBNSN7V3Ozsx3PrD8EkTEdBGZeMGXm7Vp7EBP+dBdrCh78R937xJlZPxFW94EHcZEtv iZVA07C9cXeZHfkQyxLvDW8i0MSvW56SEpIw/LxlJwdNZidLrtAr65plWFED91tYJdixYT bQR2mbVDnd+kNOjGL3VrFrNkgAkPnHdqEoy9Vxg9dGvuLGpKSPp/CHERKCijEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642071365; a=rsa-sha256; cv=none; b=kT7yX81c+EFbqOG52a2f1G+oSilK6MSKxis78MzBW4tb0+TFHAJlBzV/XnfRTCYt9VXdnd YJlnS9lsTj/rOb5Y45FkMeZGS2bn4MLNb16W6L1lIX/a+ZnXpRKb9slhjZlDOr5/0XYgQT v0InGlMyYmdeW4R+HaogMYgNOT4f6DMqrvCySWeH7w7RK3Z7N/fHYHsc+cP5HhTSRqsrP4 wfHHsGcT1d6ax8hoNbCoqqaxF4mI+1zNFSX7iB9x7b5o6x47FcyGhrSav4uMRh8qy4xaGj FlyY4gfCJIB+clRUQgTGKd/iEadgwi6alZekHVTN3q4h467Y6ArymY2DDgXzaA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b="n/6ys6+D"; dmarc=pass (policy=none) header.from=telenet.be; 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: -6.52 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b="n/6ys6+D"; dmarc=pass (policy=none) header.from=telenet.be; 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: CA33B4409B X-Spam-Score: -6.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: xnLOgcRo1xdh --=-Lkb7nopkkkiFE4w5siWQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attila Lendvai schreef op do 13-01-2022 om 09:55 [+0000]: > thank you Maxime! >=20 > with your guidance, i have managed to add guile-srfi-189 next to > the other guile-srfi-NNN packages in guile-xyz.scm (a slightly tested > diff is attached). >=20 > but when i grep for how these guile-srfi-NNN packages are actually used > within guix, then i don't see any hits unfortunately. >=20 > i tried the following to do a quick test of my new package: >=20 > $ ./pre-inst-env guix shell guile-srfi-189 > $ ./pre-inst-env guix repl > scheme@(guix-user)> ,use (srfi srfi-189) > While executing meta-command: > no code for module (srfi srfi-189) Using the guile REPL is a little less complicated than the guix repl, I would recommend trying "./pre-inst-env guix shell guile-srfi-189 -- guile" first. >=20 > how do i introduce it into the guix codebase, without breaking e.g. boots= trappability? Take a look at =E2=80=982.2 Requirements=E2=80=99 in the manual: at least for now, I would recommend that the SRFI is kept optional (using #:autoload and the like) and only required when doing Guix System things, to help people bootstrapping Guix from a foreign distro (without the binary installation, albeit with the bootstrap seeds). See for how guile-lzma was added as dependency, or see 67bf61255414115ffae0141df9dd3623bc742bff for guile-disarchive. For bootstrappability, you might have to define a copy of guile-srfi-189 in build-aux/build-self, as done for guile-gcrypt. Whether this is necessary or not depends on where srfi-189 is used.=20 IIUC, if it is needed to compute the derivation of the guix package, then it is, but otherwise, it is not. Because it is only used in (gnu services ...) and not, say, (guix packages), I don't think is necessary. However, it would be best to check. E.g. you could commit the guile-srfi-189 package definition and your changes to (gnu services ...), then do $ guix time-machine=C2=A0--commit=3Da-commit-from-before-the-srfi-was-packa= ges -- time-machine --disable-authentication --url=3D/the/checkout --commit= =3Dthe-commit-in-the-checkout --version i guess i need to add it as an input and a propagated-input to the > guix package in package-management.scm? and then progress a kind of > bootstrap stage/step, so that i can then `#:use-module (srfi srfi-189)` > it in configuration.scm? Adding to both inputs and propagated-inputs doesn't have any additional effect, adding it to propagated-input should be sufficient. probably by recording the new input as a commit, and then guix pull'ing > it into my user's profile? and only after that can i start using it withi= n > the guix codebase? (FWIW, ~/.guix-profile and ~/.config/guix/current are different profiles) Personally I wouldn't clutter ~/.config/guix/current with changes to a local checkout and I would use "guix time-machine" or "guix pull --roo= t=3D..." instead, but that's a possibility. Because guile-srfi-189 is not yet among the inputs, you will have to do "guix shell -D guix guile-srfi-189" instead of "guix shell -D guix" to set up a development environment. That won't work yet because the SRFI isn't upstream yet, but that can be circumvented with '-e ((@ (guix packages package) (name ...= ) ...)'. if that is the case, then is there a simpler/shorter way to test my new > guile-srfi-189 package before i go through all this dance? FWIW I think it's easiest to first package the SRFI, submit it and wait for the patch to be merged. Adding new inputs to Guix is complicated enough as-is. Greetings, Maxime. --=-Lkb7nopkkkiFE4w5siWQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeADyhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jkpAQC3287rOQR5f4QFVeUFh/I25QKR 2FXXY3FXH7L/ElnA6QEAlpQ1oYKEej+3VhpLTzrYrlG2zmUijaKY/VxTwaA+YA0= =eFmy -----END PGP SIGNATURE----- --=-Lkb7nopkkkiFE4w5siWQ--