Archived
1
0
Fork 0

gnu: nginx: Use modify-phases syntax.

* gnu/packages/web.scm (nginx): Use modify-phases syntax.
This commit is contained in:
David Thompson 2015-04-05 12:31:54 -04:00
parent e16fde1447
commit a71c315bc2

View file

@ -108,38 +108,36 @@ and its related documentation.")
(arguments (arguments
`(#:tests? #f ; no test target `(#:tests? #f ; no test target
#:phases #:phases
(alist-cons-before (modify-phases %standard-phases
'configure 'patch-/bin/sh (add-before configure patch-/bin/sh
(lambda _ (lambda _
(substitute* "auto/feature" (substitute* "auto/feature"
(("/bin/sh") (which "bash")))) (("/bin/sh") (which "bash")))))
(alist-replace (replace configure
'configure (lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys) (let ((flags
(let ((flags (list (string-append "--prefix=" (assoc-ref outputs "out"))
(list (string-append "--prefix=" (assoc-ref outputs "out")) "--with-http_ssl_module"
"--with-http_ssl_module" "--with-pcre-jit"
"--with-pcre-jit" "--with-ipv6"
"--with-ipv6" "--with-debug"
"--with-debug" ;; Even when not cross-building, we pass the
;; Even when not cross-building, we pass the ;; --crossbuild option to avoid customizing for the
;; --crossbuild option to avoid customizing for the ;; kernel version on the build machine.
;; kernel version on the build machine. ,(let ((system "Linux") ; uname -s
,(let ((system "Linux") ; uname -s (release "2.6.32") ; uname -r
(release "2.6.32") ; uname -r ;; uname -m
;; uname -m (machine (match (or (%current-target-system)
(machine (match (or (%current-target-system) (%current-system))
(%current-system)) ("x86_64-linux" "x86_64")
("x86_64-linux" "x86_64") ("i686-linux" "i686")
("i686-linux" "i686") ("mips64el-linux" "mips64"))))
("mips64el-linux" "mips64")))) (string-append "--crossbuild="
(string-append "--crossbuild=" system ":" release ":" machine)))))
system ":" release ":" machine))))) (setenv "CC" "gcc")
(setenv "CC" "gcc") (format #t "environment variable `CC' set to `gcc'~%")
(format #t "environment variable `CC' set to `gcc'~%") (format #t "configure flags: ~s~%" flags)
(format #t "configure flags: ~s~%" flags) (zero? (apply system* "./configure" flags))))))))
(zero? (apply system* "./configure" flags))))
%standard-phases))))
(home-page "http://nginx.org") (home-page "http://nginx.org")
(synopsis "HTTP and reverse proxy server") (synopsis "HTTP and reverse proxy server")
(description (description