Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / web.scm
index f63a3eb..cb9912e 100644 (file)
@@ -3,18 +3,18 @@
 ;;; Copyright © 2013 Aljosha Papsch <misc@rpapsch.de>
 ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015, 2016, 2017 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
-;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016 Bake Timmons <b3timmons@speedymail.org>
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
@@ -130,14 +130,14 @@ and its related documentation.")
 (define-public nginx
   (package
     (name "nginx")
-    (version "1.11.10")
+    (version "1.12.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://nginx.org/download/nginx-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0gak6pcsn1m8fsz0g95z4b72nn12ivy35vlxrmagfcvnn2mkr2vp"))))
+                "0c2vg6530qplwk8rhldww5r3cwcbw1avka53qg9sh85nzlk2w8ml"))))
     (build-system gnu-build-system)
     (inputs `(("pcre" ,pcre)
               ("openssl" ,openssl)
@@ -464,6 +464,17 @@ current version of any major web browser.")
               '(substitute* (find-files "." "^CMakeLists\\.txt$")
                  (("-Werror") "")))))
     (build-system cmake-build-system)
+    (arguments
+     `(,@(if (string-prefix? "aarch64" (or (%current-target-system)
+                                           (%current-system)))
+           '(#:phases
+             (modify-phases %standard-phases
+               (add-after 'unpack 'patch-aarch-march-detection
+                 (lambda _
+                   (substitute* (find-files "." "^CMakeLists\\.txt$")
+                     (("native") "armv8-a"))
+                   #t))))
+           '())))
     (home-page "https://github.com/miloyip/rapidjson")
     (synopsis "JSON parser/generator for C++ with both SAX/DOM style API")
     (description
@@ -626,11 +637,7 @@ used to validate and fix HTML data.")
         %standard-phases)))
     ;; All of the below are used to generate the documentation
     ;; (Should they be propagated inputs of asciidoc ??)
-    (native-inputs `(("asciidoc" ,asciidoc)
-                     ("libxml2" ,libxml2)
-                     ("docbook-xml" ,docbook-xml)
-                     ("docbook-xsl" ,docbook-xsl)
-                     ("libxslt" ,libxslt)))
+    (native-inputs `(("asciidoc" ,asciidoc)))
     (home-page "https://tinyproxy.github.io/")
     (synopsis "Light-weight HTTP/HTTPS proxy daemon")
     (description "Tinyproxy is a light-weight HTTP/HTTPS proxy
@@ -3309,13 +3316,13 @@ particularly easy to create complete web applications using httpuv alone.")
 (define-public r-jsonlite
   (package
     (name "r-jsonlite")
-    (version "1.2")
+    (version "1.4")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "jsonlite" version))
               (sha256
                (base32
-                "0k966hzp3qnwck7fgd76w49zrz39s7pqyywws17bhbcd8rh4csyb"))))
+                "11rgkjp5qir79niad0aizjxvjzyvkl6l9nsrv3ikv446vllmrasn"))))
     (build-system r-build-system)
     (home-page "http://arxiv.org/abs/1403.2805")
     (synopsis "Robust, high performance JSON parser and generator for R")
@@ -3415,18 +3422,20 @@ applications.")
 (define-public r-htmltable
   (package
     (name "r-htmltable")
-    (version "1.7")
+    (version "1.9")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "htmlTable" version))
        (sha256
         (base32
-         "0x2f2hrbhvm53zqwn0ny9wxbk34nwf6zww8cx4bjy5ax15asdllm"))))
+         "0ciic1f4iczq14j81fg7kxibn65sy8z1zxkvk1yxnxxg6dzplj2v"))))
     (properties `((upstream-name . "htmlTable")))
     (build-system r-build-system)
     (propagated-inputs
-     `(("r-knitr" ,r-knitr)
+     `(("r-checkmate" ,r-checkmate)
+       ("r-htmlwidgets" ,r-htmlwidgets)
+       ("r-knitr" ,r-knitr)
        ("r-magrittr" ,r-magrittr)
        ("r-stringr" ,r-stringr)))
     (home-page "http://gforge.se/packages/")
@@ -3444,13 +3453,13 @@ LaTeX.")
 (define-public r-curl
   (package
     (name "r-curl")
-    (version "2.3")
+    (version "2.5")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "curl" version))
               (sha256
                (base32
-                "0gbw5l0wnsw26fbr08gj9vgxrzxg8axvqxfshmd8g9khpgbdl0gr"))))
+                "09p86i5f88gx1i7cidm1ka56g0jjkghqfam96p1jhwlh2fv6nrks"))))
     (build-system r-build-system)
     (arguments
      `(#:phases
@@ -3932,7 +3941,7 @@ developed as part of the NetSurf project.")
     (native-inputs
      `(("netsurf-buildsystem" ,netsurf-buildsystem)
        ("pkg-config" ,pkg-config)
-       ("gperf" ,gperf)))
+       ("gperf" ,gperf-3.0)))
     (inputs
      `(("libwapcaplet" ,libwapcaplet)))
     (propagated-inputs
@@ -4211,17 +4220,12 @@ and similar services.")
     (version "1.12")
     (source
      (origin
-       ;; The darkhttpd release tarball URL fails to download with a
-       ;; 'TLS warning alert'. Download from the darkhttpd git repo
-       ;; until the problem has been fixed upstream.
-       (method git-fetch)
-       (uri (git-reference
-             (url (string-append "https://unix4lyfe.org/git/darkhttpd"))
-             (commit "41b68476c35270f47dcd2ddebe27cbcd87e43d41")))
+       (method url-fetch)
+       (uri (string-append "https://unix4lyfe.org/darkhttpd/darkhttpd-"
+                           version ".tar.bz2"))
        (sha256
         (base32
-         "0wi8dfgj4ic0fsy4dszl69xgxdxlwxz4c30vsw2i2dpnczgjm04k"))
-       (file-name (string-append name "-" version "-checkout"))))
+         "0185wlyx4iqiwfigp1zvql14zw7gxfacncii3d15yaxk4av1f155"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags '("CC=gcc")
@@ -4410,10 +4414,64 @@ developers can integrate into their applications to make use of the
 functions of Tidy.")
     (license l:bsd-3)))
 
+(define-public hiawatha
+  (package
+    (name "hiawatha")
+    (version "10.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.hiawatha-webserver.org/files/"
+                           "hiawatha-" version ".tar.gz"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; We use our packaged mbedtls, so delete the included copy.
+        '(delete-file-recursively "mbedtls"))
+       (sha256
+        (base32
+         "0m2llzm72s29c32abnj03532m85fawvi8ybjpx6s3mgvx2yvq3p4"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; No tests included
+       #:configure-flags (list (string-append "-DUSE_SYSTEM_MBEDTLS=on")
+                               (string-append "-DENABLE_TOMAHAWK=on")
+                               (string-append "-DWEBROOT_DIR="
+                                              (assoc-ref %outputs "out")
+                                              "/share/hiawatha/html"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-empty-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               ;; The directories in "var" are empty, remove them.
+               (delete-file-recursively (string-append out "/var"))
+               #t)))
+         (add-after 'install 'wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Make sure 'hiawatha' finds 'mbedtls'.
+             (let* ((out (assoc-ref outputs "out"))
+                    (sbin (string-append out "/sbin"))
+                    (mbed (assoc-ref inputs "mbedtls-apache")))
+               (wrap-program (string-append sbin "/hiawatha")
+                 `("PATH" ":" prefix (,mbed)))))))))
+    (inputs
+     ;; TODO: package "hiawatha-monitor", an optional dependency of "hiawatha"
+     `(("mbedtls-apache" ,mbedtls-apache) ;Hiawatha includes this version.
+       ("zlib" ,zlib)
+       ("libxslt" ,libxslt)
+       ("libxml2" ,libxml2)))
+    (home-page "https://www.hiawatha-webserver.org")
+    (synopsis "Webserver with focus on security")
+    (description
+     "Hiawatha has been written with security in mind.
+Features include the ability to stop SQL injections, XSS and CSRF attacks and
+exploit attempts.")
+    (license l:gpl2)))
+
 (define-public qutebrowser
   (package
     (name "qutebrowser")
-    (version "0.9.1")
+    (version "0.10.1")
     (source
      (origin
        (method url-fetch)
@@ -4422,14 +4480,10 @@ functions of Tidy.")
                            "qutebrowser-" version ".tar.gz"))
        (sha256
         (base32
-         "0pf91nc0xcykahc3x7ww525c9czm8zpg80nxl8n2mrzc4ilgvass"))))
+         "05qryn56w2pbqhir4pl99idx7apx2xqw9f8wmbrhj59b1xgr3x2p"))))
     (build-system python-build-system)
     (native-inputs
-     `(("asciidoc" ,asciidoc)
-       ("docbook-xsl" ,docbook-xsl)
-       ("docbook-xml" ,docbook-xml)
-       ("libxml2" ,libxml2)             ;for xmllint
-       ("libxslt" ,libxslt)))           ;for xsltproc
+     `(("asciidoc" ,asciidoc)))
     (inputs
      `(("python-colorama" ,python-colorama)
        ("python-cssutils" ,python-cssutils)