[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Store channel specification in profile
From: |
zimoun |
Subject: |
Re: Store channel specification in profile |
Date: |
Tue, 3 Mar 2020 22:49:17 +0100 |
Hi Ludo,
On Mon, 24 Feb 2020 at 17:16, Ludovic Courtès <address@hidden> 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-entries
> > 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’s 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