From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH] gnu: Add nginx Date: Fri, 12 Dec 2014 02:40:06 -0500 Message-ID: <87388l1fl5.fsf@netris.org> References: <87sigm29mf.fsf@netris.org> <874mt2gw1u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzKpO-0000xf-Jc for guix-devel@gnu.org; Fri, 12 Dec 2014 02:39:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzKpK-00051D-4q for guix-devel@gnu.org; Fri, 12 Dec 2014 02:39:54 -0500 In-Reply-To: <874mt2gw1u.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 11 Dec 2014 14:23:09 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mark H Weaver skribis: > >> From 359d1b0a7dcb7320ff28bbabe792e0d8e6d399ad Mon Sep 17 00:00:00 2001 >> From: Mark H Weaver >> Date: Wed, 10 Dec 2014 17:39:48 -0500 >> Subject: [PATCH] gnu: Add nginx. >> >> * gnu/packages/web.scm (nginx): New variable. > > LGTM, but we=E2=80=99ll 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=E2=80=99s an =E2=80=98or=E2=80=99 or s= omething else? Good point. Here's an updated patch. Mark --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-nginx.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] gnu: Add nginx >From 92e58c3b80d5c22969de9f242d42528f27191146 Mon Sep 17 00:00:00 2001 From: Mark H Weaver 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 =C2=A9 2013 Andreas Enge ;;; Copyright =C2=A9 2013 Aljosha Papsch ;;; Copyright =C2=A9 2014 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2014 Mark H Weaver ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +20,7 @@ ;;; along with GNU Guix. If not, see . =20 (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/"))) =20 +(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=3D" (assoc-ref outputs "o= ut")) + "--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=3D" + 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 ser= ver +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") --=20 2.1.2 --=-=-=--