summaryrefslogtreecommitdiff
path: root/guix/scripts/pull.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2019-10-22 18:05:51 +0200
committerLudovic Courtès <ludo@gnu.org>2019-10-27 23:05:01 +0100
commit49af34cfac89d384c46269bfd9388b2c73b1220a (patch)
tree80bb5ae532370b3e679b51feafd7949e060e2c4e /guix/scripts/pull.scm
parentb74ed90916dce6239dbe6842548f82e22fc8c249 (diff)
downloadpatches-49af34cfac89d384c46269bfd9388b2c73b1220a.tar
patches-49af34cfac89d384c46269bfd9388b2c73b1220a.tar.gz
pull: Honor '/etc/guix/channels.scm'.
* guix/scripts/pull.scm (channel-list)[global-file]: New variable. [channels]: Honor it. * doc/guix.texi (Invoking guix pull): Document it.
Diffstat (limited to 'guix/scripts/pull.scm')
-rw-r--r--guix/scripts/pull.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 7876019eac..80d070652b 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -714,6 +714,9 @@ transformations specified in OPTS (resulting from '--url', '--commit', or
(define default-file
(string-append (config-directory) "/channels.scm"))
+ (define global-file
+ (string-append %sysconfdir "/guix/channels.scm"))
+
(define (load-channels file)
(let ((result (load* file (make-user-module '((guix channels))))))
(if (and (list? result) (every channel? result))
@@ -725,6 +728,8 @@ transformations specified in OPTS (resulting from '--url', '--commit', or
(load-channels file))
((file-exists? default-file)
(load-channels default-file))
+ ((file-exists? global-file)
+ (load-channels global-file))
(else
%default-channels)))