mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 04:59:27 -05:00
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,6 +386,35 @@ (define-public nginx
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:tests? #f ; no test target
|
#:tests? #f ; no test target
|
||||||
|
#:configure-flags
|
||||||
|
#~(list "--with-http_ssl_module"
|
||||||
|
"--with-http_v2_module"
|
||||||
|
"--with-http_xslt_module"
|
||||||
|
"--with-http_gzip_static_module"
|
||||||
|
"--with-http_gunzip_module"
|
||||||
|
"--with-http_addition_module"
|
||||||
|
"--with-http_sub_module"
|
||||||
|
"--with-pcre-jit"
|
||||||
|
"--with-debug"
|
||||||
|
"--with-stream"
|
||||||
|
;; Even when not cross-building, we pass the
|
||||||
|
;; --crossbuild option to avoid customizing for the
|
||||||
|
;; kernel version on the build machine.
|
||||||
|
#$(let ((system "Linux") ; uname -s
|
||||||
|
(release "3.2.0") ; uname -r
|
||||||
|
;; uname -m
|
||||||
|
(machine (match (or (%current-target-system)
|
||||||
|
(%current-system))
|
||||||
|
("x86_64-linux" "x86_64")
|
||||||
|
("i686-linux" "i686")
|
||||||
|
("mips64el-linux" "mips64")
|
||||||
|
;; Prevent errors when querying
|
||||||
|
;; this package on unsupported
|
||||||
|
;; platforms, e.g. when running
|
||||||
|
;; "guix package --search="
|
||||||
|
(_ "UNSUPPORTED"))))
|
||||||
|
(string-append "--crossbuild="
|
||||||
|
system ":" release ":" machine)))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-before 'configure 'patch-/bin/sh
|
(add-before 'configure 'patch-/bin/sh
|
||||||
|
@ -394,45 +423,16 @@ (define-public nginx
|
||||||
(("/bin/sh") (which "sh")))))
|
(("/bin/sh") (which "sh")))))
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
;; The configure script is hand-written, not from GNU autotools.
|
;; The configure script is hand-written, not from GNU autotools.
|
||||||
(lambda* (#:key configure-flags inputs outputs #:allow-other-keys)
|
(lambda* (#:key configure-flags inputs #:allow-other-keys)
|
||||||
(let ((flags
|
(setenv "CC" #$(cc-for-target))
|
||||||
(append (list (string-append "--prefix=" (assoc-ref outputs "out"))
|
;; Fix ./configure test for ‘#include <libxml/parser.h>’.
|
||||||
"--with-http_ssl_module"
|
(setenv "CFLAGS" ; CPPFLAGS is not respected
|
||||||
"--with-http_v2_module"
|
(string-append "-I" (search-input-directory
|
||||||
"--with-http_xslt_module"
|
inputs "/include/libxml2")))
|
||||||
"--with-http_gzip_static_module"
|
(format #t "configure flags: ~s~%" configure-flags)
|
||||||
"--with-http_gunzip_module"
|
(apply invoke "./configure"
|
||||||
"--with-http_addition_module"
|
(string-append "--prefix=" #$output)
|
||||||
"--with-http_sub_module"
|
configure-flags)))
|
||||||
"--with-pcre-jit"
|
|
||||||
"--with-debug"
|
|
||||||
"--with-stream"
|
|
||||||
;; Even when not cross-building, we pass the
|
|
||||||
;; --crossbuild option to avoid customizing for the
|
|
||||||
;; kernel version on the build machine.
|
|
||||||
#$(let ((system "Linux") ; uname -s
|
|
||||||
(release "3.2.0") ; uname -r
|
|
||||||
;; uname -m
|
|
||||||
(machine (match (or (%current-target-system)
|
|
||||||
(%current-system))
|
|
||||||
("x86_64-linux" "x86_64")
|
|
||||||
("i686-linux" "i686")
|
|
||||||
("mips64el-linux" "mips64")
|
|
||||||
;; Prevent errors when querying
|
|
||||||
;; this package on unsupported
|
|
||||||
;; platforms, e.g. when running
|
|
||||||
;; "guix package --search="
|
|
||||||
(_ "UNSUPPORTED"))))
|
|
||||||
(string-append "--crossbuild="
|
|
||||||
system ":" release ":" machine)))
|
|
||||||
configure-flags)))
|
|
||||||
(setenv "CC" #$(cc-for-target))
|
|
||||||
;; Fix ./configure test for ‘#include <libxml/parser.h>’.
|
|
||||||
(setenv "CFLAGS" ; CPPFLAGS is not respected
|
|
||||||
(string-append "-I" (assoc-ref inputs "libxml2")
|
|
||||||
"/include/libxml2"))
|
|
||||||
(format #t "configure flags: ~s~%" flags)
|
|
||||||
(apply invoke "./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")))
|
||||||
|
|
Loading…
Reference in a new issue