Add support for http_proxy environment variable to install quicklisp.

See #153.
This commit is contained in:
Dimitri Fontaine 2015-01-21 15:57:29 +01:00
parent ce5a61face
commit 8ce967744c
2 changed files with 20 additions and 2 deletions

View File

@ -83,8 +83,10 @@ $(QLDIR)/local-projects/esrap:
$(QLDIR)/setup.lisp:
mkdir -p $(BUILDDIR)
curl -o $(BUILDDIR)/quicklisp.lisp http://beta.quicklisp.org/quicklisp.lisp
$(CL) $(CL_OPTS) --load $(BUILDDIR)/quicklisp.lisp \
--eval '(quicklisp-quickstart:install :path "$(BUILDDIR)/quicklisp")' \
$(CL) $(CL_OPTS) --load $(BUILDDIR)/quicklisp.lisp \
--load src/getenv.lisp \
--eval '(quicklisp-quickstart:install :path "$(BUILDDIR)/quicklisp" \
:proxy (getenv "http_proxy"))' \
--eval '(quit)'
quicklisp: $(QLDIR)/setup.lisp ;

16
src/getenv.lisp Normal file
View File

@ -0,0 +1,16 @@
;;;
;;; Export a getenv feature so that we can fetch http_proxy at build time.
;;;
;;; We can't rely on Quicklisp to have installed a modern ASDF with UIOP yet
;;; here: we need the feature to pass in the :proxy argument to
;;; quicklisp-quickstart:install.
;;;
(in-package :cl-user)
(defun getenv (name &optional default)
"Return the current value for the environment variable NAME, or default
when unset."
(or #+sbcl (sb-ext:posix-getenv name)
#+ccl (ccl:getenv name)
default))