diff --git a/Makefile b/Makefile index ede62f6..784ce91 100644 --- a/Makefile +++ b/Makefile @@ -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 ; diff --git a/src/getenv.lisp b/src/getenv.lisp new file mode 100644 index 0000000..dcb7987 --- /dev/null +++ b/src/getenv.lisp @@ -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))