--- resolver.rkt-orig 2010-06-06 11:19:13.000000000 +0100 +++ resolver.rkt 2010-06-20 20:27:30.000000000 +0100 @@ -217,6 +217,16 @@ exn:fail:planet? make-exn:fail:planet) +;; This is not the correct place for this... +(define (parse-proxy-string proxy-url-string) + (cond ((regexp-match #rx"^http://([a-zA-Z0-9.-]+):([0-9]+)" proxy-url-string) + => (λ (l) `(("http" ,(cadr l) ,(string->number (caddr l)))))) + ((regexp-match #rx"^http://([a-zA-Z0-9.-]+)" proxy-url-string) + => (λ (l) `(("http" ,(cadr l) 80)))) + (else (error (format "Can't parse proxy URL ~a" proxy-url-string))))) +(when (getenv "http_proxy") + (current-proxy-servers (parse-proxy-string (getenv "http_proxy")))) + ;; if #f, will not install packages and instead raise a exn:fail:install? error (define install? (make-parameter #t)) ;; if #f, will not download packages and instead raise a exn:fail:install? error