gnu: nginx: Respect #:configure-flags.
* gnu/packages/web.scm (nginx)[arguments]: Add #:configure-flags. Move default settings out of the 'configure' phase.
This commit is contained in:
parent
4079cd9ba3
commit
c9ce02ecff
1 changed files with 39 additions and 39 deletions
|
@ -386,18 +386,8 @@ the same, being completely separated from the Internet.")
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:tests? #f ; no test target
|
#:tests? #f ; no test target
|
||||||
#:phases
|
#:configure-flags
|
||||||
#~(modify-phases %standard-phases
|
#~(list "--with-http_ssl_module"
|
||||||
(add-before 'configure 'patch-/bin/sh
|
|
||||||
(lambda _
|
|
||||||
(substitute* "auto/feature"
|
|
||||||
(("/bin/sh") (which "sh")))))
|
|
||||||
(replace 'configure
|
|
||||||
;; The configure script is hand-written, not from GNU autotools.
|
|
||||||
(lambda* (#:key configure-flags inputs outputs #:allow-other-keys)
|
|
||||||
(let ((flags
|
|
||||||
(append (list (string-append "--prefix=" (assoc-ref outputs "out"))
|
|
||||||
"--with-http_ssl_module"
|
|
||||||
"--with-http_v2_module"
|
"--with-http_v2_module"
|
||||||
"--with-http_xslt_module"
|
"--with-http_xslt_module"
|
||||||
"--with-http_gzip_static_module"
|
"--with-http_gzip_static_module"
|
||||||
|
@ -425,14 +415,24 @@ the same, being completely separated from the Internet.")
|
||||||
(_ "UNSUPPORTED"))))
|
(_ "UNSUPPORTED"))))
|
||||||
(string-append "--crossbuild="
|
(string-append "--crossbuild="
|
||||||
system ":" release ":" machine)))
|
system ":" release ":" machine)))
|
||||||
configure-flags)))
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-before 'configure 'patch-/bin/sh
|
||||||
|
(lambda _
|
||||||
|
(substitute* "auto/feature"
|
||||||
|
(("/bin/sh") (which "sh")))))
|
||||||
|
(replace 'configure
|
||||||
|
;; The configure script is hand-written, not from GNU autotools.
|
||||||
|
(lambda* (#:key configure-flags inputs #:allow-other-keys)
|
||||||
(setenv "CC" #$(cc-for-target))
|
(setenv "CC" #$(cc-for-target))
|
||||||
;; Fix ./configure test for ‘#include <libxml/parser.h>’.
|
;; Fix ./configure test for ‘#include <libxml/parser.h>’.
|
||||||
(setenv "CFLAGS" ; CPPFLAGS is not respected
|
(setenv "CFLAGS" ; CPPFLAGS is not respected
|
||||||
(string-append "-I" (assoc-ref inputs "libxml2")
|
(string-append "-I" (search-input-directory
|
||||||
"/include/libxml2"))
|
inputs "/include/libxml2")))
|
||||||
(format #t "configure flags: ~s~%" flags)
|
(format #t "configure flags: ~s~%" configure-flags)
|
||||||
(apply invoke "./configure" flags))))
|
(apply invoke "./configure"
|
||||||
|
(string-append "--prefix=" #$output)
|
||||||
|
configure-flags)))
|
||||||
(add-after 'install 'install-man-page
|
(add-after 'install 'install-man-page
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((man (string-append #$output "/share/man")))
|
(let ((man (string-append #$output "/share/man")))
|
||||||
|
|
Reference in a new issue