[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/08: gnu: nginx: Use G-expressions.
From: |
guix-commits |
Subject: |
06/08: gnu: nginx: Use G-expressions. |
Date: |
Thu, 7 Apr 2022 17:19:01 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 4079cd9ba33b0d2cd23897899dfc66836797e4d2
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Thu Apr 7 22:41:06 2022 +0200
gnu: nginx: Use G-expressions.
* gnu/packages/web.scm (nginx)[arguments]: Rewrite in gexp style. Remove
trailing #t's.
---
gnu/packages/web.scm | 140 +++++++++++++++++++++++++--------------------------
1 file changed, 68 insertions(+), 72 deletions(-)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 4fb3d12892..068f17dff5 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -384,78 +384,74 @@ the same, being completely separated from the Internet.")
(build-system gnu-build-system)
(inputs (list libxml2 libxslt openssl pcre zlib))
(arguments
- `(#:tests? #f ; no test target
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'patch-/bin/sh
- (lambda _
- (substitute* "auto/feature"
- (("/bin/sh") (which "sh")))
- #t))
- (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_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)))
- 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)
- #t)))
- (add-after 'install 'install-man-page
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (man (string-append out "/share/man")))
- (install-file "objs/nginx.8" (string-append man "/man8"))
- #t)))
- (add-after 'install 'fix-root-dirs
- (lambda* (#:key outputs #:allow-other-keys)
- ;; 'make install' puts things in strange places, so we need to
- ;; clean it up ourselves.
- (let* ((out (assoc-ref outputs "out"))
- (share (string-append out "/share/nginx")))
- ;; This directory is empty, so get rid of it.
- (rmdir (string-append out "/logs"))
- ;; Example configuration and HTML files belong in
- ;; /share.
- (mkdir-p share)
- (rename-file (string-append out "/conf")
- (string-append share "/conf"))
- (rename-file (string-append out "/html")
- (string-append share "/html"))
- #t))))))
+ (list
+ #:tests? #f ; no test target
+ #: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 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_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)))
+ 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
+ (lambda _
+ (let ((man (string-append #$output "/share/man")))
+ (install-file "objs/nginx.8" (string-append man "/man8")))))
+ (add-after 'install 'fix-root-dirs
+ (lambda _
+ ;; 'make install' puts things in strange places, so we need to
+ ;; clean it up ourselves.
+ (let* ((out #$output)
+ (share (string-append out "/share/nginx")))
+ ;; This directory is empty, so get rid of it.
+ (rmdir (string-append out "/logs"))
+ ;; Example configuration and HTML files belong in
+ ;; /share.
+ (mkdir-p share)
+ (rename-file (string-append out "/conf")
+ (string-append share "/conf"))
+ (rename-file (string-append out "/html")
+ (string-append share "/html"))))))))
(home-page "https://nginx.org")
(synopsis "HTTP and reverse proxy server")
(description
- branch master updated (b749329888 -> 1d4f2cdc82), guix-commits, 2022/04/07
- 06/08: gnu: nginx: Use G-expressions.,
guix-commits <=
- 07/08: gnu: nginx: Respect #:configure-flags., guix-commits, 2022/04/07
- 02/08: gnu: LLVM, Clang: Add 14.0.0., guix-commits, 2022/04/07
- 03/08: gnu: ungoogled-chromium: Update to 99.0.4844.84-1., guix-commits, 2022/04/07
- 01/08: gnu: radeontop: Simplify inputs., guix-commits, 2022/04/07
- 05/08: gnu: uBlock Origin: Update to 1.42.4., guix-commits, 2022/04/07
- 04/08: gnu: ungoogled-chromium: Update to 100.0.4896.75-1., guix-commits, 2022/04/07
- 08/08: gnu: nginx: Build optimized binaries., guix-commits, 2022/04/07