From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SHPmJs3NoWPKNgAAbAwnHQ (envelope-from ) for ; Tue, 20 Dec 2022 15:59:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aJHuJs3NoWMHdAEA9RJhRA (envelope-from ) for ; Tue, 20 Dec 2022 15:59:25 +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 64E8C68F2 for ; Tue, 20 Dec 2022 15:59:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7e2x-0006le-Vi; Tue, 20 Dec 2022 09:56:48 -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 1p7e2v-0006iy-Ec for guix-devel@gnu.org; Tue, 20 Dec 2022 09:56:45 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7e2r-0004hu-V3 for guix-devel@gnu.org; Tue, 20 Dec 2022 09:56:45 -0500 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id BE198100006; Tue, 20 Dec 2022 14:56:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1671548196; h=from:from: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; bh=M+DOpC9e4qmX2FN28nEBD58BUe7WoHXAb5FrwSkx6zQ=; b=pA3DtbTSkz77sK7Lu9nVX9G2QCsoKGwHPuhiZoAcmLt7YT2OxnR+2oe6SRgoap19fqGngO Owb6qr5CoQZekcjMPjoGXQ0MUDHXDgSXO/iQrErE6D4WemHvq/mAfr3xaHy8VG8pCkRC8m 0qrA/uwpk0R7cRW8feTqJh3hb/ob3Lyknb/Gsn8y+cOIR+jFBhDRbVVUD47doRr33twKNL 1YXrGCpLTOpIa61YdXRQ13goFCzQComY+LVRj6BLgjrossDIzA5eOOadbQBzewvr9UXY98 YZAnsUXQ9wxzm5U6xvzDtfJDx3q6ljI6i2VuFKghB3cMgisvbxtOw0H2AyuZVA== From: Andrew Tropin To: Mekeor Melire Cc: Liliana Marie Prikler , guix-devel@gnu.org Subject: Re: Proof of Concept: Import Emacs' use-packaged packages into Guix' manifest.scm In-Reply-To: <87a63ih062.fsf@posteo.de> References: <87r0wxbhm5.fsf@posteo.de> <87bknzzolv.fsf@trop.in> <87a63ih062.fsf@posteo.de> Date: Tue, 20 Dec 2022 18:56:30 +0400 Message-ID: <87zgbixgwx.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.178.231; envelope-from=andrew@trop.in; helo=relay11.mail.gandi.net 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b=pA3DtbTS; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671548365; a=rsa-sha256; cv=none; b=ubJb3n53TsSvbtAb99pj51cGKhO5GgxRA0ETcmbpRqJ1zhqqBwclqFJWnNzfKErU7ZidXG jr5id6ro2ZL23+Ho2j5+J/NIce9ujf3PniMQB4pBJksiPH/TkHCzH0P0MdfiR7QUN+QDmt HVc9XTWXLePy/3tnfCgB3P0u3ZzMXqupRyxkMTUFFnsfwyHmM+RxJP5r0ZYCiQV8mI+Zvz NFwLTonubLfyskmS6wOlyGps10/o1QhNQe5XgdfE3Gf5eVZqn9/7ltr/nhC4uXUozIdLwF tHU2veOpIqkiS31eX6nJkrtK35388M7SDheRQx5Y/UwP6Jg+PgWHWeXWSlox9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671548365; 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=M+DOpC9e4qmX2FN28nEBD58BUe7WoHXAb5FrwSkx6zQ=; b=muCjl9ctcnQvyP4BiTjgM+vLMN7MMwrZoR8GHZWannLqozYt8fxSqrHvIvWFHa9sfDakyy PnzKD54Qdv1cnMjULwscV/T53zfSk6dRgzV8iYuFQIxHU76Gj4v1crigYE7X8tsojAmNj7 uwI7C0mBpiRb1gn3fAPxxexavuYreeJE+Jvh6T27j+C/AFdzcbAdEE1xiMS2pJAVJgQ50q sq2LJFATXWiB0+Zo4HhNZaIEOy9OkzLO6o6a3SpIuSuCcQsLmiNXyRdsspPOlo7yIiAxMh 8zSY/Zyy4lyBKHA9seMTwudFpBe1kjO06CtQ8uWYmQzH9M/1nAE3DLyc4azRhA== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b=pA3DtbTS; 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-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -7.55 X-Spam-Score: -7.55 X-Migadu-Queue-Id: 64E8C68F2 X-TUID: 8ykSVToyeJ6w --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2022-12-20 09:45, Mekeor Melire wrote: > 2022-12-19 14:15 andrew@trop.in: > >> On 2022-12-18 09:11, Liliana Marie Prikler wrote: >> >> > Am Sonntag, dem 18.12.2022 um 01:54 +0000 schrieb Mekeor Melire: > >> I'm neither the author, nor the user of guix home import, however I thin= k it=20 >> could be a good place for such a functionality, but I would suggest to=20 >> maintain this helper functions for a while in a personal channel, mature= it=20 >> and revisit this question later. > > Good idea. But separating this into a personal channel could also lead to= the=20 > feature being forgotten. > >> To make a solution more robust and complete, you can take a look at=20 >> straight.el and how it redefines use-package-ensure-function and do=20 >> something similiar to generate a list of packages for guix. Another deta= il=20 >> is that use-package accepts a symbol value for :ensure and you can write= =20 >> something like: >> >> ;; (setq use-package-always-ensure t) ; as an alternative to :ensure t >> (use-package vertico >> :ensure t >> ...) >> >> (use-package vertico-directory >> :ensure vertico >> ...) > > True! The parser should consider the :ensure keyword. > >> This way you won't need a concept of "blocked" packages. > > It'd still be good to have such a concept in order to block packages that= =20 > won't be used on Guix-driven system. For example: > > #+begin_src elisp > (when (this-is-not-a-guix-driven-system) > (use-package some-package-that-is-not-packaged-for-guix)) > > ;; or equivalently > > (use-package some-package-that-is-not-packaged-for-guix > :when (this-is-not-a-guix-driven-system)) > #+end_src > >> One more idea: make a function which accepts file-like/origin object ins= tead=20 >> of string and generates a package with propagated-dependencies based on = the=20 >> content of source code provided as an argument. > > You mean something like this?: > > #+begin_src scheme > (define-public my-emacs > (emacs-from-init > :custom-emacs-package emacs-with-athena-instead-of-gtk > :init "/home/user/.emacs.d/init.el")) > #+end_src I meant something like this: =2D-8<---------------cut here---------------start------------->8--- (package-propagating-guix-packages-extracted-from-elisp-configuration ;; or just (local-file "./emacs/init.el") or maybe even a remote ;; repository with emacs configuration. #:configuration (local-file "./emacs/configuration/directory" #:recursive? #t)) =2D-8<---------------cut here---------------end--------------->8--- > > By the way, this won't be a "pure" package. When using=20 > =3DemacsWithPackagesFromUsePackage=3D feature from nix-community's emacs-= overlay,=20 > I needed to pass an --impure flag. > >> Personally, with my emacs config I do the things vice versa: I have elis= p=20 >> code in scheme files with a list of explicit dependencies: >> >> https://git.sr.ht/~abcdw/rde/tree/b57387f2/src/rde/features/emacs-xyz.sc= m#L946 > > Interesting! =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmOhzR8ACgkQIgjSCVjB 3rCAWg/9FWHUOpwFFqtSKm4o1h/Y59ZdEzDD3IEu/tOQpNIEtKR3mJq6P16J75Rj mmA1Q7/pC3HJsPHXWmdsu7Wa4i21cfZBZNzSfhsjKlKi8PwSBOnNyvyBdx4iEzl9 uB7Z3pYg63vjkLeraPqy5RWXGxXXVxOaH1F5+7aN5RalFxjtmMBJCOgoPEd5Fhcg gKU1TFLa7MZEK6DoETlO/1jdChf52cqnyYFHBmDAVsdCwkLjF0eCean0Uw0sn4gj Lv4Pe0AiDbdJvMR14zshNwvySjeT/sMjqEkGfZbPBkfNZdl34BZmLSqwQlOsuVsb S2uiXpMTgYf52gVf0rOP8RvaiU/1aHHPK8Ygg4BqFBB/keQR4qpRnggWoSFznWF8 cnZR1cChgED5jf1O8+gzFzZoxryTqlLyZsCgmdlpuksIFiiqyJ3WrSZJM0eQZRni SUmAqjvp2GzcJPvWvFNimPUXr//1bdpYSMZ3be5BDJwnfWJ/qIBeZnqCBwz51g1K 9uZedQ0XgBzP0KY7BakCiDN1rCI3M9armufOWOuguSbUtJmfS2miIRaV2SVlfhp+ LpqdHXLjIG/PS4OzCt22vdGD6ZdAqWskqINg6wXcYJX4ZyiNVQewlc/8iUBttAsf K7gQ+/AumjAqCCnpqYDDpZQ9WHviFRnQZikaFR71rEvsKpmS6dQ= =V2bw -----END PGP SIGNATURE----- --=-=-=--