* [PATCH] gnu: Add nginx
@ 2014-12-11 2:39 Mark H Weaver
2014-12-11 2:54 ` David Thompson
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Mark H Weaver @ 2014-12-11 2:39 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: [PATCH] gnu: Add nginx --]
[-- Type: text/x-patch, Size: 4259 bytes --]
From 359d1b0a7dcb7320ff28bbabe792e0d8e6d399ad Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Wed, 10 Dec 2014 17:39:48 -0500
Subject: [PATCH] gnu: Add nginx.
* gnu/packages/web.scm (nginx): New variable.
---
gnu/packages/web.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 0731d0b..c64f874 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Aljosha Papsch <misc@rpapsch.de>
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,6 +20,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages web)
+ #:use-module (ice-9 match)
#:use-module ((guix licenses) #:prefix l:)
#:use-module (guix packages)
#:use-module (guix download)
@@ -26,6 +28,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system cmake)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages apr)
#:use-module (gnu packages asciidoc)
#:use-module (gnu packages docbook)
@@ -77,6 +80,63 @@ and its related documentation.")
(license l:asl2.0)
(home-page "https://httpd.apache.org/")))
+(define-public nginx
+ (package
+ (name "nginx")
+ (version "1.6.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://nginx.org/download/nginx-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "060s77qxhkn02fjkcndsr0xppj2bppjzkj0gn84svrykb4lqqq5m"))))
+ (build-system gnu-build-system)
+ (inputs `(("pcre" ,pcre)
+ ("openssl" ,openssl)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:tests? #f ; no test target
+ #:phases
+ (alist-cons-before
+ 'configure 'patch-/bin/sh
+ (lambda _
+ (substitute* "auto/feature"
+ (("/bin/sh") (which "bash"))))
+ (alist-replace
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((flags
+ (list (string-append "--prefix=" (assoc-ref outputs "out"))
+ "--with-http_ssl_module"
+ "--with-pcre-jit"
+ ;; 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
+ ;; uname -r
+ (release (package-version linux-libre-headers))
+ ;; uname -m
+ (machine (match (or (%current-target-system)
+ (%current-system))
+ ("x86_64-linux" "x86_64")
+ ("i686-linux" "i686")
+ ("mips64el-linux" "mips64"))))
+ (string-append "--crossbuild="
+ system ":" release ":" machine)))))
+ (setenv "CC" "gcc")
+ (format #t "environment variable `CC' set to `gcc'~%")
+ (format #t "configure flags: ~s~%" flags)
+ (zero? (apply system* "./configure" flags))))
+ %standard-phases))))
+ (home-page "http://nginx.org")
+ (synopsis "HTTP and reverse proxy server")
+ (description
+ "Nginx (\"engine X\") is a high-performance web and reverse proxy server
+created by Igor Sysoev. It can be used both as a standalone web server
+and as a proxy to reduce the load on back-end HTTP or mail servers.")
+ (license (list l:bsd-2 l:bsd-3 l:bsd-4 l:expat))))
+
(define-public json-c
(package
(name "json-c")
--
2.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: Add nginx
2014-12-11 2:39 [PATCH] gnu: Add nginx Mark H Weaver
@ 2014-12-11 2:54 ` David Thompson
2014-12-11 8:33 ` Mark H Weaver
2014-12-11 13:23 ` Ludovic Courtès
2 siblings, 0 replies; 6+ messages in thread
From: David Thompson @ 2014-12-11 2:54 UTC (permalink / raw)
To: Mark H Weaver, guix-devel
Thank you so much for this! I have tried and failed to package nginx a
couple of times now. Glad that I won't have to try a third time.
The patch looks solid to me.
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: Add nginx
2014-12-11 2:39 [PATCH] gnu: Add nginx Mark H Weaver
2014-12-11 2:54 ` David Thompson
@ 2014-12-11 8:33 ` Mark H Weaver
2014-12-11 13:23 ` Ludovic Courtès
2 siblings, 0 replies; 6+ messages in thread
From: Mark H Weaver @ 2014-12-11 8:33 UTC (permalink / raw)
To: guix-devel
Mark H Weaver <mhw@netris.org> writes:
> From 359d1b0a7dcb7320ff28bbabe792e0d8e6d399ad Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Wed, 10 Dec 2014 17:39:48 -0500
> Subject: [PATCH] gnu: Add nginx.
Based on my experiences attempting to deploy this server in practice,
the compile-time configuration needs more work. I'll post an updated
version later.
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: Add nginx
2014-12-11 2:39 [PATCH] gnu: Add nginx Mark H Weaver
2014-12-11 2:54 ` David Thompson
2014-12-11 8:33 ` Mark H Weaver
@ 2014-12-11 13:23 ` Ludovic Courtès
2014-12-12 7:40 ` Mark H Weaver
2 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2014-12-11 13:23 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel
Mark H Weaver <mhw@netris.org> skribis:
> From 359d1b0a7dcb7320ff28bbabe792e0d8e6d399ad Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Wed, 10 Dec 2014 17:39:48 -0500
> Subject: [PATCH] gnu: Add nginx.
>
> * gnu/packages/web.scm (nginx): New variable.
LGTM, but we’ll wait for the next iteration if you want.
> + (license (list l:bsd-2 l:bsd-3 l:bsd-4 l:expat))))
Can you add a comment saying if it’s an ‘or’ or something else?
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: Add nginx
2014-12-11 13:23 ` Ludovic Courtès
@ 2014-12-12 7:40 ` Mark H Weaver
2014-12-12 13:28 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Mark H Weaver @ 2014-12-12 7:40 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 599 bytes --]
ludo@gnu.org (Ludovic Courtès) writes:
> Mark H Weaver <mhw@netris.org> skribis:
>
>> From 359d1b0a7dcb7320ff28bbabe792e0d8e6d399ad Mon Sep 17 00:00:00 2001
>> From: Mark H Weaver <mhw@netris.org>
>> Date: Wed, 10 Dec 2014 17:39:48 -0500
>> Subject: [PATCH] gnu: Add nginx.
>>
>> * gnu/packages/web.scm (nginx): New variable.
>
> LGTM, but we’ll wait for the next iteration if you want.
>
>> + (license (list l:bsd-2 l:bsd-3 l:bsd-4 l:expat))))
>
> Can you add a comment saying if it’s an ‘or’ or something else?
Good point. Here's an updated patch.
Mark
[-- Attachment #2: [PATCH] gnu: Add nginx --]
[-- Type: text/x-patch, Size: 4599 bytes --]
From 92e58c3b80d5c22969de9f242d42528f27191146 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Wed, 10 Dec 2014 17:39:48 -0500
Subject: [PATCH] gnu: Add nginx.
* gnu/packages/web.scm (nginx): New variable.
---
gnu/packages/web.scm | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 0731d0b..2bccd57 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Aljosha Papsch <misc@rpapsch.de>
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,6 +20,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages web)
+ #:use-module (ice-9 match)
#:use-module ((guix licenses) #:prefix l:)
#:use-module (guix packages)
#:use-module (guix download)
@@ -26,6 +28,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system cmake)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages apr)
#:use-module (gnu packages asciidoc)
#:use-module (gnu packages docbook)
@@ -77,6 +80,69 @@ and its related documentation.")
(license l:asl2.0)
(home-page "https://httpd.apache.org/")))
+(define-public nginx
+ (package
+ (name "nginx")
+ (version "1.6.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://nginx.org/download/nginx-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "060s77qxhkn02fjkcndsr0xppj2bppjzkj0gn84svrykb4lqqq5m"))))
+ (build-system gnu-build-system)
+ (inputs `(("pcre" ,pcre)
+ ("openssl" ,openssl)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:tests? #f ; no test target
+ #:phases
+ (alist-cons-before
+ 'configure 'patch-/bin/sh
+ (lambda _
+ (substitute* "auto/feature"
+ (("/bin/sh") (which "bash"))))
+ (alist-replace
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((flags
+ (list (string-append "--prefix=" (assoc-ref outputs "out"))
+ "--with-http_ssl_module"
+ "--with-pcre-jit"
+ "--with-ipv6"
+ "--with-debug"
+ ;; 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 "2.6.32") ; uname -r
+ ;; uname -m
+ (machine (match (or (%current-target-system)
+ (%current-system))
+ ("x86_64-linux" "x86_64")
+ ("i686-linux" "i686")
+ ("mips64el-linux" "mips64"))))
+ (string-append "--crossbuild="
+ system ":" release ":" machine)))))
+ (setenv "CC" "gcc")
+ (format #t "environment variable `CC' set to `gcc'~%")
+ (format #t "configure flags: ~s~%" flags)
+ (zero? (apply system* "./configure" flags))))
+ %standard-phases))))
+ (home-page "http://nginx.org")
+ (synopsis "HTTP and reverse proxy server")
+ (description
+ "Nginx (\"engine X\") is a high-performance web and reverse proxy server
+created by Igor Sysoev. It can be used both as a standalone web server
+and as a proxy to reduce the load on back-end HTTP or mail servers.")
+ ;; Almost all of nginx is distributed under the bsd-2 license.
+ ;; The exceptions are:
+ ;; * The 'nginx-http-push' module is covered by the expat license.
+ ;; * The 'nginx-development-kit' module is mostly covered by bsd-3,
+ ;; except for two source files which are bsd-4 licensed.
+ (license (list l:bsd-2 l:expat l:bsd-3 l:bsd-4))))
+
(define-public json-c
(package
(name "json-c")
--
2.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-12 13:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-11 2:39 [PATCH] gnu: Add nginx Mark H Weaver
2014-12-11 2:54 ` David Thompson
2014-12-11 8:33 ` Mark H Weaver
2014-12-11 13:23 ` Ludovic Courtès
2014-12-12 7:40 ` Mark H Weaver
2014-12-12 13:28 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.