From 316fc2acbb112bfa572ae30f95a93bcd56621234 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 27 Jan 2021 14:46:10 +0100 Subject: channels: Record 'guix' channel metadata in (guix config). Partially fixes . * guix/config.scm.in (%channel-metadata): New variable. * guix/describe.scm (channel-metadata): Use it. (current-channels): New procedure. (current-profile-entries): Clarify docstring. * guix/self.scm (compiled-guix): Add #:channel-metadata and pass it to 'make-config.scm'. (make-config.scm): Add #:channel-metadata and define '%channel-metadata' in the generated file. (guix-derivation): Add #:channel-metadata and pass it to 'compiled-guix'. * guix/channels.scm (build-from-source): Replace 'name', 'source', and 'commit' parameters with 'instance'. Pass #:channel-metadata to BUILD. (build-channel-instance): Adjust accordingly. * build-aux/build-self.scm (build-program): Add #:channel-metadata and pass it to 'guix-derivation'. (build): Add #:channel-metadata and pass it to 'build-program'. * guix/scripts/describe.scm (display-profile-info): Add optional 'channels' parameter. Pass it to 'display-profile-content'. (display-profile-content): Add optional 'channels' parameter and honor it. Iterate on CHANNELS rather than on the manifest entries of PROFILE. (guix-describe): When PROFILE is #f, call 'current-channels' and pass it to 'display-profile-info', unless it returns the empty list. --- guix/config.scm.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'guix/config.scm.in') diff --git a/guix/config.scm.in b/guix/config.scm.in index b2901735d8..223c9eb418 100644 --- a/guix/config.scm.in +++ b/guix/config.scm.in @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2021 Ludovic Courtès ;;; Copyright © 2017 Caleb Ristvedt ;;; ;;; This file is part of GNU Guix. @@ -23,6 +23,8 @@ (define-module (guix config) %guix-bug-report-address %guix-home-page-url + %channel-metadata + %storedir %localstatedir %sysconfdir @@ -56,6 +58,13 @@ (define %guix-bug-report-address (define %guix-home-page-url "@PACKAGE_URL@") +(define %channel-metadata + ;; When true, this is an sexp containing metadata for the 'guix' channel + ;; this file was built from. This is used by (guix describe). + + ;; TODO: Implement 'configure.ac' machinery to initialize it. + #f) + (define %storedir "@storedir@") -- cgit v1.2.3