From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: Store channel specification in profile Date: Tue, 3 Mar 2020 22:49:17 +0100 Message-ID: References: <87blsyelgm.fsf@ambrevar.xyz> <87tv69bezo.fsf@gnu.org> <87zhg1xvmo.fsf@ambrevar.xyz> <874kx8gxh1.fsf@ambrevar.xyz> <87blreasgd.fsf@ambrevar.xyz> <87pnfpsgfx.fsf@gnu.org> <87a76rqu5j.fsf@ambrevar.xyz> <877e1vqowd.fsf@ambrevar.xyz> <87zhe4px2a.fsf@ambrevar.xyz> <87wo91p9yt.fsf@gnu.org> <87eev8gewx.fsf@ambrevar.xyz> <87pneq140d.fsf@gnu.org> <8736bldmzr.fsf@ambrevar.xyz> <87zhdp2p16.fsf@gnu.org> <87imkdky1w.fsf@ambrevar.xyz> <87ftf0j6zq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37352) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9FPw-0001rK-Va for guix-devel@gnu.org; Tue, 03 Mar 2020 16:49:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9FPv-0002VR-R6 for guix-devel@gnu.org; Tue, 03 Mar 2020 16:49:32 -0500 In-Reply-To: <87ftf0j6zq.fsf@gnu.org> 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+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: Guix Devel Hi Ludo, On Mon, 24 Feb 2020 at 17:16, Ludovic Court=C3=A8s wrote: > > ;; Thanks to Ivan Vilata-i-Balaguer for this: > > (define (guix-commit) > > (let ((guix-manifest (profile-manifest (string-append (getenv "HOME")= "/.config/guix/current")))) > > (match (assq 'source (manifest-entry-properties (car (manifest-entr= ies guix-manifest)))) > > (('source ('repository ('version 0) _ _ > > ('commit commit) _ ...)) > > commit) > > (_ #f)))) > > > > (match (command-line) > > ((_ where) > > (format #t ";; commit: ~a\n" (guix-commit)) > > (pretty-print > > `(specifications->manifest > > ',(guix-manifest where)))) > > Emitting channel info as comments like this, and/or a warning when > there=E2=80=99s a conflict (packages coming from different commits of the= same > channel) could be done as a second step. The snippet uses the last commit of "guix pull", right? Or the commit of last installed package with "guix package -i"? Even if it can be done as a second step, the commits of each installed packages are IMHO the key point of the exporter. Because otherwise, I am doing "guix package -I | cut" and I am almost done. Cheers, simon