From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 yNqzHK2JoWNu7wAAbAwnHQ (envelope-from ) for ; Tue, 20 Dec 2022 11:08:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WHlsHK2JoWORCAEAauVa8A (envelope-from ) for ; Tue, 20 Dec 2022 11:08:45 +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 465C63C1C2 for ; Tue, 20 Dec 2022 11:08:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7ZIr-0001fB-2C; Tue, 20 Dec 2022 04:52:53 -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 1p7ZIp-0001eL-Fz for guix-devel@gnu.org; Tue, 20 Dec 2022 04:52:51 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7ZIm-0005rY-Uq for guix-devel@gnu.org; Tue, 20 Dec 2022 04:52:51 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C4F4424002B for ; Tue, 20 Dec 2022 10:52:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1671529966; bh=BfDiEC595QTixczUSH/DfRjVIuiwr0dsSc2Cz6G1P5c=; h=From:To:Cc:Subject:Date:From; b=CqKQJOgDz6iCZFY2PsKhiHOD2sqv1DWXFhRJMg0HFw4IHnu/gKKf4dApirvLJB7KQ xfcFW0p9DQqRk52GizjEtsASdWWSUAnUyVqQF4cN00pX6GZiQI1MyCwZ2Y3SfRSpCx qorCVpspjDcymIKj0X5wZYteMpyh/TzzEP8mcYySY7XZ/r8mMHeYHgw5CzVoe/dCJ0 80IGsetQsHKntzIJr/I1XHHBQnGmVRnVG9etkQHTe/JfvhJnIM4HmICQ4Eelom6O4P HCjzJH1HmhCwNMuNM7OEajALuoSsArnY4gIsAbfdxu7AAOqGvNDvvE03rSgfnTwUe5 UqdyrJw3oe84g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NbsM205PWz6tmS; Tue, 20 Dec 2022 10:52:45 +0100 (CET) References: <87r0wxbhm5.fsf@posteo.de> <87bknzzolv.fsf@trop.in> From: Mekeor Melire To: Andrew Tropin Cc: Liliana Marie Prikler , guix-devel@gnu.org Subject: Re: Proof of Concept: Import Emacs' use-packaged packages into Guix' manifest.scm Date: Tue, 20 Dec 2022 09:45:40 +0000 In-reply-to: <87bknzzolv.fsf@trop.in> Message-ID: <87a63ih062.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=185.67.36.65; envelope-from=mekeor@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, 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=posteo.de header.s=2017 header.b=CqKQJOgD; dmarc=pass (policy=none) header.from=posteo.de; 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=1671530925; a=rsa-sha256; cv=none; b=Q2IMd9EM26aBeSMSdIdeA6d388tFDOPmZRF6xnp281cN40MxlL4M0REqGgBUcN1wB50SJ8 0PnNdco1sVIQMhg3v+rnHCxxo/PerzAKAmWr85n4Jf8ICRox86e72kjNQjRVxo0861x3Qe UAhLIXigKdlyzRNNcWLqVT1DbPRMm9rM5HvBKAJ8NmbHcKonsNs3HeMgfuyx3e4ttTfpkC E+Y3BIgrgt7s12PjbifS7iu4yAu9ytA5LFkM9jGA2O90R0UK+71V15L03q9aeee5sC0YA2 +JzDK9MUCZUfH5hA7DZ9Btw+YokB+jWeUpmJDaD2ZkpczNKs6j9oMUJWW/XXFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671530925; 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=E0zmpzXndR0hAffJuwQc7q+rFFaC+fnz1a/tNfftJwQ=; b=G6qAs8s3/qWtSlfB1cMWL0AXxhGJFu0gUDqE/C3nb7M6vnxpzS0HEL0lUvbXrkOIj8Zx1Y T8Itbpu9+QP/kLiHhfvtbz+Kx1ptmiG2zQC+ExEl5jXpnXZ5qvTboKsechxLuWvJ9+6Wlz PqzkNOVqsF4UNf/nSkJzL5XEhbc45wCNjF9gof06O7Fg75eAJx4IxDUNiI0vek0Ka7t6qP /BgSdHO906p0aFfArItBMW5uECcb30ejQ3/S8rqKg6vIFJFrziY8KYxHIRKXKWaQYg/hna b78n2QgpuBd8CZvjjTzoHDQww9QmVx1dJ1JZMeUYdijbjGymMOMjinZBuJfQLA== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=CqKQJOgD; dmarc=pass (policy=none) header.from=posteo.de; 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.43 X-Spam-Score: -7.43 X-Migadu-Queue-Id: 465C63C1C2 X-TUID: 7EMQjyaDQBKm 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 think it > could be a good place for such a functionality, but I would suggest to > maintain this helper functions for a while in a personal channel, mature it > and revisit this question later. Good idea. But separating this into a personal channel could also lead to the feature being forgotten. > To make a solution more robust and complete, you can take a look at > straight.el and how it redefines use-package-ensure-function and do > something similiar to generate a list of packages for guix. Another detail > is that use-package accepts a symbol value for :ensure and you can write > 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 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 instead > of string and generates a package with propagated-dependencies based on the > 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 By the way, this won't be a "pure" package. When using =emacsWithPackagesFromUsePackage= feature from nix-community's emacs-overlay, I needed to pass an --impure flag. > Personally, with my emacs config I do the things vice versa: I have elisp > code in scheme files with a list of explicit dependencies: > > https://git.sr.ht/~abcdw/rde/tree/b57387f2/src/rde/features/emacs-xyz.scm#L946 Interesting!