Dear Bengt,

On Thu, 16 Jul 2020 at 02:46, Bengt Richter <b...@bokr.com> wrote:

> readlink -f 
> /var/guix/profiles/per-user/{$USER,root}/current-guix/manifest|xargs grep -m1 
> -A1 guix
>
> get you? Anything useful?

I am not sure the issue is to get the commit identifier. :-)

Otherwise, the Guix schemish way is something like:

--8<---------------cut here---------------start------------->8---
(use-modules
 (ice-9 match)
 (srfi srfi-1)
 ((guix describe) #:select (current-profile))
 ((guix config) #:select (%guix-version))
 (guix channels))

(match (current-profile)
  (#f %guix-version)   ;for lack of a better ID
  (profile
   (let ((channel (find guix-channel? (profile-channels profile))))
     (channel-commit channel))))
--8<---------------cut here---------------end--------------->8---

(From a Ludo’s hint for the last sources.json patch. :-))

All the best,
simon



Reply via email to