From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0Cx7-0004r1-3j for guix-patches@gnu.org; Thu, 05 Oct 2017 16:41:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0Cx4-00034h-8z for guix-patches@gnu.org; Thu, 05 Oct 2017 16:41:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43150) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0Cx4-00034O-5r for guix-patches@gnu.org; Thu, 05 Oct 2017 16:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e0Cx3-0004q4-TC for guix-patches@gnu.org; Thu, 05 Oct 2017 16:41:01 -0400 Subject: [bug#28127] [PATCH 2/2] web: Add nginx-documentation. Resent-Message-ID: From: Christopher Baines Date: Thu, 5 Oct 2017 21:40:13 +0100 Message-Id: <20171005204013.24889-2-mail@cbaines.net> In-Reply-To: <20171005204013.24889-1-mail@cbaines.net> References: <20171005204013.24889-1-mail@cbaines.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28127@debbugs.gnu.org * gnu/packages/web.scm (nginx): Add comment about updating the documentation. (nginx-xslscript): New variable. (nginx-docs): New variable. --- gnu/packages/web.scm | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index a2af98da5..a612be013 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -43,6 +43,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix cvs-download) + #:use-module (guix hg-download) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) @@ -139,6 +140,8 @@ and its related documentation.") (define-public nginx (package (name "nginx") + ;; Consider updating the nginx-docs package if the nginx package is + ;; updated. (version "1.12.1") (source (origin (method url-fetch) @@ -225,6 +228,101 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.") ;; except for two source files which are bsd-4 licensed. (license (list l:bsd-2 l:expat l:bsd-3 l:bsd-4)))) +(define nginx-xslscript + (let ((revision 11) + (changeset "01dc9ba12e1b")) + (package + (name "nginx-xslscript") + (version + (simple-format #f "2014-03-31-~A-~A" revision changeset)) + (source (origin + (method hg-fetch) + (uri (hg-reference + (url "http://hg.nginx.org/xslscript") + (changeset changeset))) + (file-name (string-append name "-" version)) + (sha256 + (base32 + "0am8zvdx3jmiwkg5q07qjaw5r26r4i2v5i4yr8a1k0jgib6ii08g")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; No test suite + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out-bin (string-append + (assoc-ref outputs "out") + "/bin"))) + (mkdir-p out-bin) + (copy-file "xslscript.pl" + (string-append + out-bin + "/xslscript.pl")) + #t)))))) + (home-page "http://hg.nginx.org/xslscript") + (synopsis "XSLScript with NGinx specific modifications") + (description + "XSLScript is a terse notation for writing complex XSLT stylesheets. +This is modified version, specifically intended for use with the NGinx +documentation.") + (license l:bsd-2)))) + +(define-public nginx-documentation + ;; This documentation should be relevant for nginx-1.12.0 + (let ((revision 1961) + (changeset "dd4b6c564e10")) + (package + (name "nginx-documentation") + (version + (simple-format #f "2017-04-12-~A-~A" revision changeset)) + (source + (origin (method hg-fetch) + (uri (hg-reference + (url "http://hg.nginx.org/nginx.org") + (changeset changeset))) + (file-name (string-append name "-" version)) + (sha256 + (base32 + "0rycfnnm2xkm777769h1zib428q45j64mx8nzzfzs4v07jbfc8m5")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; No test suite + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (let ((output (assoc-ref outputs "out"))) + (substitute* "umasked.sh" + ((" /bin/sh") (string-append " " (which "sh")))) + ;; The documentation includes a banner, which makes sense on + ;; the NGinx website, but doesn't make much sense when + ;; viewing locally. Therefore, modify the CSS to remove the + ;; banner. + (substitute* "xslt/style.xslt" + (("#banner \\{ background: black;") + "#banner { background: black; + display: none;")) + (zero? (system* "make"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((output (assoc-ref outputs "out"))) + (mkdir-p output) + (copy-recursively "libxslt" output) + #t)))))) + (native-inputs + `(("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("nginx-xslscript" ,nginx-xslscript))) + (home-page "https://nginx.org") + (synopsis "Documentation for nginx web server") + (description + "This package provides HTML documentation for the nginx web server.") + (license l:bsd-2)))) + (define-public fcgi (package (name "fcgi") -- 2.14.2