bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42212: Guix version rendered as 0.0-git in info manual


From: zimoun
Subject: bug#42212: Guix version rendered as 0.0-git in info manual
Date: Thu, 16 Jul 2020 12:06:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Dear Bengt,

On Thu, 16 Jul 2020 at 02:46, Bengt Richter <bokr@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

[Prev in Thread] Current Thread [Next in Thread]