me
/
guix
Archived
1
0
Fork 0

gnu: nginx: Use G-expressions.

* gnu/packages/web.scm (nginx)[arguments]: Rewrite in gexp style.  Remove
trailing #t's.
master
Marius Bakke 2022-04-07 22:41:06 +02:00
parent cee03495bf
commit 4079cd9ba3
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 68 additions and 72 deletions

View File

@ -384,14 +384,14 @@ the same, being completely separated from the Internet.")
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (list libxml2 libxslt openssl pcre zlib)) (inputs (list libxml2 libxslt openssl pcre zlib))
(arguments (arguments
`(#:tests? #f ; no test target (list
#:tests? #f ; no test target
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'configure 'patch-/bin/sh (add-before 'configure 'patch-/bin/sh
(lambda _ (lambda _
(substitute* "auto/feature" (substitute* "auto/feature"
(("/bin/sh") (which "sh"))) (("/bin/sh") (which "sh")))))
#t))
(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 outputs #:allow-other-keys)
@ -410,7 +410,7 @@ the same, being completely separated from the Internet.")
;; 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 "3.2.0") ; uname -r (release "3.2.0") ; uname -r
;; uname -m ;; uname -m
(machine (match (or (%current-target-system) (machine (match (or (%current-target-system)
@ -426,25 +426,22 @@ the same, being completely separated from the Internet.")
(string-append "--crossbuild=" (string-append "--crossbuild="
system ":" release ":" machine))) system ":" release ":" machine)))
configure-flags))) configure-flags)))
(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" (assoc-ref inputs "libxml2")
"/include/libxml2")) "/include/libxml2"))
(format #t "configure flags: ~s~%" flags) (format #t "configure flags: ~s~%" flags)
(apply invoke "./configure" flags) (apply invoke "./configure" flags))))
#t)))
(add-after 'install 'install-man-page (add-after 'install 'install-man-page
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (let ((man (string-append #$output "/share/man")))
(man (string-append out "/share/man"))) (install-file "objs/nginx.8" (string-append man "/man8")))))
(install-file "objs/nginx.8" (string-append man "/man8"))
#t)))
(add-after 'install 'fix-root-dirs (add-after 'install 'fix-root-dirs
(lambda* (#:key outputs #:allow-other-keys) (lambda _
;; 'make install' puts things in strange places, so we need to ;; 'make install' puts things in strange places, so we need to
;; clean it up ourselves. ;; clean it up ourselves.
(let* ((out (assoc-ref outputs "out")) (let* ((out #$output)
(share (string-append out "/share/nginx"))) (share (string-append out "/share/nginx")))
;; This directory is empty, so get rid of it. ;; This directory is empty, so get rid of it.
(rmdir (string-append out "/logs")) (rmdir (string-append out "/logs"))
@ -454,8 +451,7 @@ the same, being completely separated from the Internet.")
(rename-file (string-append out "/conf") (rename-file (string-append out "/conf")
(string-append share "/conf")) (string-append share "/conf"))
(rename-file (string-append out "/html") (rename-file (string-append out "/html")
(string-append share "/html")) (string-append share "/html"))))))))
#t))))))
(home-page "https://nginx.org") (home-page "https://nginx.org")
(synopsis "HTTP and reverse proxy server") (synopsis "HTTP and reverse proxy server")
(description (description