* How to programmatically get the current channel commits?
@ 2019-07-19 5:49 Chris Marusich
2019-08-22 21:20 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Chris Marusich @ 2019-07-19 5:49 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 411 bytes --]
Hi,
It's possible to get the current Guix version via %guix-version,
exported by (guix config). This is useful, among other reasons, for
embedding in package definitions that produce artifacts that are
destined to leave the store (e.g., a statically linked program you want
to ship off somewhere else). Is it possible to programmatically get the
channel commits currently in use, also?
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to programmatically get the current channel commits?
2019-07-19 5:49 How to programmatically get the current channel commits? Chris Marusich
@ 2019-08-22 21:20 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2019-08-22 21:20 UTC (permalink / raw)
To: Chris Marusich; +Cc: guix-devel
Hi,
Chris Marusich <cmmarusich@gmail.com> skribis:
> It's possible to get the current Guix version via %guix-version,
> exported by (guix config). This is useful, among other reasons, for
> embedding in package definitions that produce artifacts that are
> destined to leave the store (e.g., a statically linked program you want
> to ship off somewhere else). Is it possible to programmatically get the
> channel commits currently in use, also?
Recently I added ‘profile-channels’, which does what you want I think:
--8<---------------cut here---------------start------------->8---
$ guix repl
GNU Guile 2.2.4
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guix-user)> ,use(guix channels)
scheme@(guix-user)> ,use(guix describe)
scheme@(guix-user)> (profile-channels (current-profile))
$1 = (#<<channel> name: guix url: "https://git.savannah.gnu.org/git/guix.git" branch: "master" commit: "178f1d1f75a8d512b517f474f63da507beaebd49" location: ((line . 549) (column . 19) (filename . "guix/channels.scm"))>)
--8<---------------cut here---------------end--------------->8---
I’d recommend against embedding such metadata into build results by
default, though. See also ‘guix pack --save-provenance’.
HTH!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-22 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-19 5:49 How to programmatically get the current channel commits? Chris Marusich
2019-08-22 21:20 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.