From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diPn2-0001N3-0p for guix-patches@gnu.org; Thu, 17 Aug 2017 14:45:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1diPmw-0005ws-Kz for guix-patches@gnu.org; Thu, 17 Aug 2017 14:45:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34438) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1diPmw-0005wZ-HH for guix-patches@gnu.org; Thu, 17 Aug 2017 14:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1diPmw-0005k4-6Q for guix-patches@gnu.org; Thu, 17 Aug 2017 14:45:02 -0400 Subject: [bug#28127] [PATCH 2/2] web: Add NGinx documentation. Resent-Message-ID: From: Christopher Baines Date: Thu, 17 Aug 2017 19:44:04 +0100 Message-Id: <20170817184404.18517-2-mail@cbaines.net> In-Reply-To: <20170817184404.18517-1-mail@cbaines.net> References: <20170817184404.18517-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 deleting 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 6eb9833f2..5e58ad3f8 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) @@ -134,6 +135,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) @@ -212,6 +215,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-docs + ;; This documentation should be relevant for nginx-1.12.0 + (let ((revision 1961) + (changeset "dd4b6c564e10")) + (package + (name "nginx-docs") + (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") + (description + "The documentation for the NGinx web server.") + (license l:bsd-2)))) + (define-public fcgi (package (name "fcgi") -- 2.14.1