guix-commits
[Top][All Lists]
Advanced

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

01/01: services: guix: Support using an HTTP proxy.


From: Leo Famulari
Subject: 01/01: services: guix: Support using an HTTP proxy.
Date: Wed, 22 Feb 2017 15:26:04 -0500 (EST)

lfam pushed a commit to branch master
in repository guix.

commit 93d32da9f8bba815b1effe6358904b5e1f9c73ff
Author: Leo Famulari <address@hidden>
Date:   Tue Feb 21 14:57:02 2017 -0500

    services: guix: Support using an HTTP proxy.
    
    * gnu/services/base.scm (<guix-configuration>)[http-proxy]: New field.
    (guix-shepherd-service): Use 'http-proxy' in #:environment-variables.
    * doc/guix.texi (Base Services)[guix-configuration]: Document it.
---
 doc/guix.texi         |  4 ++++
 gnu/services/base.scm | 13 +++++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 6cdb5e5..19a31c6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8611,6 +8611,10 @@ are written.
 @item @code{lsof} (default: @var{lsof})
 The lsof package to use.
 
address@hidden @code{http-proxy} (default: @code{#f})
+The HTTP proxy used for downloading fixed-output derivations and
+substitutes.
+
 @end table
 @end deftp
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 57601ea..0fb7bd7 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2015, 2016 Alex Kost <address@hidden>
 ;;; Copyright © 2015, 2016 Mark H Weaver <address@hidden>
 ;;; Copyright © 2015 Sou Bunnbu <address@hidden>
-;;; Copyright © 2016 Leo Famulari <address@hidden>
+;;; Copyright © 2016, 2017 Leo Famulari <address@hidden>
 ;;; Copyright © 2016 David Craven <address@hidden>
 ;;; Copyright © 2016 Ricardo Wurmus <address@hidden>
 ;;;
@@ -1114,7 +1114,9 @@ failed to register hydra.gnu.org public key: ~a~%" 
status))))))))
   (log-file         guix-configuration-log-file   ;string
                     (default "/var/log/guix-daemon.log"))
   (lsof             guix-configuration-lsof       ;<package>
-                    (default lsof)))
+                    (default lsof))
+  (http-proxy       guix-http-proxy               ;string | #f
+                    (default #f)))
 
 (define %default-guix-configuration
   (guix-configuration))
@@ -1125,7 +1127,7 @@ failed to register hydra.gnu.org public key: ~a~%" 
status))))))))
     (($ <guix-configuration> guix build-group build-accounts
                              authorize-key? keys
                              use-substitutes? substitute-urls extra-options
-                             log-file lsof)
+                             log-file lsof http-proxy)
      (list (shepherd-service
             (documentation "Run the Guix daemon.")
             (provision '(guix-daemon))
@@ -1142,7 +1144,10 @@ failed to register hydra.gnu.org public key: ~a~%" 
status))))))))
 
                 ;; Add 'lsof' (for the GC) to the daemon's $PATH.
                 #:environment-variables
-                (list (string-append "PATH=" #$lsof "/bin"))
+                (list (string-append "PATH=" #$lsof "/bin")
+                      #$@(if http-proxy
+                             (list (string-append "http_proxy=" http-proxy))
+                             '()))
 
                 #:log-file #$log-file))
             (stop #~(make-kill-destructor)))))))



reply via email to

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