diff options
Diffstat (limited to 'pkgs/servers/http')
| -rw-r--r-- | pkgs/servers/http/apache-httpd/2.4.nix | 8 | ||||
| -rw-r--r-- | pkgs/servers/http/apache-modules/mod_dnssd/default.nix | 2 | ||||
| -rw-r--r-- | pkgs/servers/http/apache-modules/mod_python/default.nix | 10 | ||||
| -rw-r--r-- | pkgs/servers/http/apt-cacher-ng/default.nix | 4 | ||||
| -rw-r--r-- | pkgs/servers/http/couchdb/2.0.0.nix | 57 | ||||
| -rw-r--r-- | pkgs/servers/http/couchdb/default.nix | 39 | ||||
| -rw-r--r-- | pkgs/servers/http/couchdb/jsapi.patch | 60 | ||||
| -rw-r--r-- | pkgs/servers/http/gitlab-pages/default.nix | 10 | ||||
| -rw-r--r-- | pkgs/servers/http/jboss/default.nix | 4 | ||||
| -rw-r--r-- | pkgs/servers/http/nginx/generic.nix | 1 | ||||
| -rw-r--r-- | pkgs/servers/http/trafficserver/default.nix | 207 |
11 files changed, 229 insertions, 173 deletions
diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index 7ab78f833ed7..788ada55a19a 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -1,4 +1,5 @@ { lib, stdenv, fetchurl, perl, zlib, apr, aprutil, pcre, libiconv, lynx +, nixosTests , proxySupport ? true , sslSupport ? true, openssl , http2Support ? true, nghttp2 @@ -16,12 +17,12 @@ assert ldapSupport -> aprutil.ldapSupport && openldap != null; assert http2Support -> nghttp2 != null; stdenv.mkDerivation rec { - version = "2.4.46"; + version = "2.4.47"; pname = "apache-httpd"; src = fetchurl { url = "mirror://apache/httpd/httpd-${version}.tar.bz2"; - sha256 = "1sj1rwgbcjgkzac3ybjy7j68c9b3dv3ap71m48mrjhf6w7vds3kl"; + sha256 = "sha256-I9AG28jleBFqETj6RX7qgkBIRY6JyECHIZ8DcogMA8o="; }; # FIXME: -dev depends on -doc @@ -85,6 +86,9 @@ stdenv.mkDerivation rec { passthru = { inherit apr aprutil sslSupport proxySupport ldapSupport luaSupport lua5; + tests = { + acme-integration = nixosTests.acme; + }; }; meta = with lib; { diff --git a/pkgs/servers/http/apache-modules/mod_dnssd/default.nix b/pkgs/servers/http/apache-modules/mod_dnssd/default.nix index da1b4e456b76..773136a0201c 100644 --- a/pkgs/servers/http/apache-modules/mod_dnssd/default.nix +++ b/pkgs/servers/http/apache-modules/mod_dnssd/default.nix @@ -28,6 +28,6 @@ stdenv.mkDerivation rec { description = "Provide Zeroconf support via DNS-SD using Avahi"; license = licenses.asl20; platforms = platforms.linux; - maintainers = with maintainers; [ lethalman ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/servers/http/apache-modules/mod_python/default.nix b/pkgs/servers/http/apache-modules/mod_python/default.nix index 3d9d4b21c409..1b8ef94fae95 100644 --- a/pkgs/servers/http/apache-modules/mod_python/default.nix +++ b/pkgs/servers/http/apache-modules/mod_python/default.nix @@ -1,10 +1,11 @@ -{ lib, stdenv, fetchurl, apacheHttpd, python2 }: +{ lib, stdenv, fetchurl, apacheHttpd, python2, libintl }: stdenv.mkDerivation rec { - name = "mod_python-3.5.0"; + pname = "mod_python"; + version = "3.5.0"; src = fetchurl { - url = "http://dist.modpython.org/dist/${name}.tgz"; + url = "http://dist.modpython.org/dist/${pname}-${version}.tgz"; sha256 = "146apll3yfqk05s8fkf4acmxzqncl08bgn4rv0c1rd4qxmc91w0f"; }; @@ -24,7 +25,8 @@ stdenv.mkDerivation rec { passthru = { inherit apacheHttpd; }; - buildInputs = [ apacheHttpd python2 ]; + buildInputs = [ apacheHttpd python2 ] + ++ lib.optional stdenv.isDarwin libintl; meta = { homepage = "http://modpython.org/"; diff --git a/pkgs/servers/http/apt-cacher-ng/default.nix b/pkgs/servers/http/apt-cacher-ng/default.nix index c79a9fe3fd27..9e40bb648ea5 100644 --- a/pkgs/servers/http/apt-cacher-ng/default.nix +++ b/pkgs/servers/http/apt-cacher-ng/default.nix @@ -15,11 +15,11 @@ stdenv.mkDerivation rec { pname = "apt-cacher-ng"; - version = "3.6.1"; + version = "3.6.3"; src = fetchurl { url = "http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_${version}.orig.tar.xz"; - sha256 = "sha256-avyjp4KH7l6OZxnMVDv1U/MIWcadqyPPtnLYzEYkqlA="; + sha256 = "sha256-P4ArWpxjOjBi9EiDp/ord17GfUOFwpiTKGvSEuZljGA="; }; nativeBuildInputs = [ cmake doxygen pkg-config ]; diff --git a/pkgs/servers/http/couchdb/2.0.0.nix b/pkgs/servers/http/couchdb/2.0.0.nix deleted file mode 100644 index 2881a3dc196b..000000000000 --- a/pkgs/servers/http/couchdb/2.0.0.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5 -, coreutils, bash, makeWrapper, python3 }: - -stdenv.mkDerivation rec { - pname = "couchdb"; - version = "2.3.1"; - - - # when updating this, please consider bumping the OTP version - # in all-packages.nix - src = fetchurl { - url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz"; - sha256 = "0z926hjqyhxhyr65kqxwpmp80nyfqbig6d9dy8dqflpb87n8rss3"; - }; - - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ erlang icu openssl spidermonkey_1_8_5 (python3.withPackages(ps: with ps; [ requests ]))]; - - patches = [ ./jsapi.patch ]; - postPatch = '' - substituteInPlace src/couch/rebar.config.script --replace '-DHAVE_CURL -I/usr/local/include' "-DHAVE_CURL -I/usr/local/include $NIX_CFLAGS_COMPILE" - - patch bin/rebar <<EOF - 1c1 - < #!/usr/bin/env escript - --- - > #!${coreutils}/bin/env escript - EOF - - ''; - - # Configure a username. The build system would use "couchdb" as - # default if none is provided. Note that it is unclear where this - # username is actually used in the build, as any choice seems to be - # working. - configurePhase = '' - ./configure -u nobody - ''; - - buildPhase = '' - make release - ''; - - installPhase = '' - mkdir -p $out - cp -r rel/couchdb/* $out - wrapProgram $out/bin/couchdb --suffix PATH : ${bash}/bin - ''; - - meta = with lib; { - description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API"; - homepage = "http://couchdb.apache.org"; - license = licenses.asl20; - platforms = platforms.all; - maintainers = with maintainers; [ ]; - }; -} diff --git a/pkgs/servers/http/couchdb/default.nix b/pkgs/servers/http/couchdb/default.nix deleted file mode 100644 index 45023e800afb..000000000000 --- a/pkgs/servers/http/couchdb/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5, curl, help2man -, sphinx, which, file, pkg-config, getopt }: - -stdenv.mkDerivation rec { - pname = "couchdb"; - version = "1.7.1"; - - src = fetchurl { - url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz"; - sha256 = "1b9cbdrmh1i71mrwvhm17v4cf7lckpil1vvq7lpmxyn6zfk0l84i"; - }; - - nativeBuildInputs = [ help2man which file pkg-config sphinx ]; - buildInputs = [ erlang icu openssl spidermonkey_1_8_5 curl ]; - - postInstall = '' - substituteInPlace $out/bin/couchdb --replace getopt "${getopt}/bin/getopt" - ''; - - /* - Versions of SpiderMonkey after the js185-1.0.0 release remove the optional - enforcement of preventing anonymous functions in a statement context. This - will most likely break your existing JavaScript code as well as render all - example code invalid. - - If you wish to ignore this error pass --enable-js-trunk to ./configure. - */ - configureFlags = [ - "--enable-js-trunk" - ]; - - meta = with lib; { - description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API"; - homepage = "http://couchdb.apache.org"; - license = licenses.asl20; - platforms = platforms.all; - maintainers = with maintainers; [ ]; - }; -} diff --git a/pkgs/servers/http/couchdb/jsapi.patch b/pkgs/servers/http/couchdb/jsapi.patch deleted file mode 100644 index bb7d4ca610c7..000000000000 --- a/pkgs/servers/http/couchdb/jsapi.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -ru couch_js/http.c couch_js-patched/http.c ---- apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c 2016-09-12 11:28:51.000000000 +0200 -+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/http.c 2017-02-10 10:52:33.025854045 +0100 -@@ -15,7 +15,7 @@ - #include <string.h> - #include <sys/types.h> - #include <sys/stat.h> --#include <jsapi.h> -+#include <js/jsapi.h> - #include "config.h" - #include "utf8.h" - #include "util.h" -diff -ru couch_js/main.c couch_js-patched/main.c ---- apache-couchdb-2.0.0/src/couch/priv/couch_js/main.c 2016-09-12 11:28:51.000000000 +0200 -+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/main.c 2017-02-10 10:52:33.001854154 +0100 -@@ -20,7 +20,7 @@ - #include <unistd.h> - #endif - --#include <jsapi.h> -+#include <js/jsapi.h> - #include "config.h" - #include "http.h" - #include "utf8.h" -diff -ru couch_js/utf8.c couch_js-patched/utf8.c ---- apache-couchdb-2.0.0/src/couch/priv/couch_js/utf8.c 2016-09-12 11:28:51.000000000 +0200 -+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/utf8.c 2017-02-10 10:52:33.009854117 +0100 -@@ -10,7 +10,7 @@ - // License for the specific language governing permissions and limitations under - // the License. - --#include <jsapi.h> -+#include <js/jsapi.h> - #include "config.h" - - static int -diff -ru couch_js/util.c couch_js-patched/util.c ---- apache-couchdb-2.0.0/src/couch/priv/couch_js/util.c 2016-09-12 11:28:51.000000000 +0200 -+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/util.c 2017-02-10 10:52:33.017854081 +0100 -@@ -13,7 +13,7 @@ - #include <stdlib.h> - #include <string.h> - --#include <jsapi.h> -+#include <js/jsapi.h> - - #include "help.h" - #include "util.h" -diff -ru couch_js/util.h couch_js-patched/util.h ---- apache-couchdb-2.0.0/src/couch/priv/couch_js/util.h 2016-09-12 11:28:51.000000000 +0200 -+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/util.h 2017-02-10 10:52:32.988854212 +0100 -@@ -13,7 +13,7 @@ - #ifndef COUCHJS_UTIL_H - #define COUCHJS_UTIL_H - --#include <jsapi.h> -+#include <js/jsapi.h> - - typedef struct { - int no_eval; diff --git a/pkgs/servers/http/gitlab-pages/default.nix b/pkgs/servers/http/gitlab-pages/default.nix index 920a32999296..a26dd47e0243 100644 --- a/pkgs/servers/http/gitlab-pages/default.nix +++ b/pkgs/servers/http/gitlab-pages/default.nix @@ -2,23 +2,23 @@ buildGoModule rec { pname = "gitlab-pages"; - version = "1.35.0"; + version = "1.39.0"; src = fetchFromGitLab { owner = "gitlab-org"; repo = "gitlab-pages"; rev = "v${version}"; - sha256 = "sha256-5AkzbOutBXy59XvMwfyH6A8ETwjP2QokG/Rz31/nCpk="; + sha256 = "sha256-eyg2o/5k7/zagYjkYJOnJrHeoszbRkmdl7UgO+rmKyc="; }; - vendorSha256 = "sha256-g8FDWpZmbZSkJAzoEiI8/JZLTTgG7uJ4sS35axaEXLY="; + vendorSha256 = "sha256-aedJ7vsv70aybjqBfUnSr4qhlFdY7jUUOSas3vXskpM="; subPackages = [ "." ]; - doCheck = false; # Broken meta = with lib; { description = "Daemon used to serve static websites for GitLab users"; homepage = "https://gitlab.com/gitlab-org/gitlab-pages"; + changelog = "https://gitlab.com/gitlab-org/gitlab-pages/-/blob/v${version}/CHANGELOG.md"; license = licenses.mit; - maintainers = with maintainers; [ das_j ]; + maintainers = with maintainers; [ ajs124 das_j ]; }; } diff --git a/pkgs/servers/http/jboss/default.nix b/pkgs/servers/http/jboss/default.nix index fda57cb9a549..162d018e7294 100644 --- a/pkgs/servers/http/jboss/default.nix +++ b/pkgs/servers/http/jboss/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, unzip, jdk }: +{ lib, stdenv, fetchurl, jdk }: stdenv.mkDerivation { name = "jboss-as-7.1.1.Final"; @@ -7,8 +7,6 @@ stdenv.mkDerivation { sha256 = "1bdjw0ib9qr498vpfbg8klqw6rl11vbz7vwn6gp1r5gpqkd3zzc8"; }; - nativeBuildInputs = [ unzip ]; - phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; installPhase = '' diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 76d5ff88c15f..39c2c39d567e 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -145,6 +145,7 @@ stdenv.mkDerivation { tests = { inherit (nixosTests) nginx nginx-auth nginx-etag nginx-pubhtml nginx-sandbox nginx-sso; variants = lib.recurseIntoAttrs nixosTests.nginx-variants; + acme-integration = nixosTests.acme; }; }; diff --git a/pkgs/servers/http/trafficserver/default.nix b/pkgs/servers/http/trafficserver/default.nix new file mode 100644 index 000000000000..4a7f9854d183 --- /dev/null +++ b/pkgs/servers/http/trafficserver/default.nix @@ -0,0 +1,207 @@ +{ lib +, stdenv +, fetchurl +, fetchpatch +, makeWrapper +, nixosTests +, pkg-config +, file +, linuxHeaders +, openssl +, pcre +, perlPackages +, python3 +, xz +, zlib +# recommended dependencies +, withHwloc ? true +, hwloc +, withCurl ? true +, curl +, withCurses ? true +, ncurses +, withCap ? stdenv.isLinux +, libcap +, withUnwind ? stdenv.isLinux +, libunwind +# optional dependencies +, withBrotli ? false +, brotli +, withCjose ? false +, cjose +, withGeoIP ? false +, geoip +, withHiredis ? false +, hiredis +, withImageMagick ? false +, imagemagick +, withJansson ? false +, jansson +, withKyotoCabinet ? false +, kyotocabinet +, withLuaJIT ? false +, luajit +, withMaxmindDB ? false +, libmaxminddb +# optional features +, enableWCCP ? false +}: + +stdenv.mkDerivation rec { + pname = "trafficserver"; + version = "9.0.1"; + + src = fetchurl { + url = "mirror://apache/trafficserver/trafficserver-${version}.tar.bz2"; + sha256 = "1q164pvfmbqh3gzy3bqy96lwd0fdbhz78r06pd92p7rmkqwx005z"; + }; + + patches = [ + # Adds support for NixOS + # https://github.com/apache/trafficserver/pull/7697 + (fetchpatch { + url = "https://github.com/apache/trafficserver/commit/19d3af481cf74c91fbf713fc9d2f8b138ed5fbaf.diff"; + sha256 = "0z1ikgpp00rzrrcqh97931586yn9wbksgai9xlkcjd5cg8gq0150"; + }) + + # Fixes a bug in tspush which pushes incorrect contents to cache + # https://github.com/apache/trafficserver/pull/7696 + (fetchpatch { + url = "https://github.com/apache/trafficserver/commit/b08215272872f452787915cd3a8e0b0ea0b88385.diff"; + sha256 = "0axk8x1xvd8wvpgcxgyqqg7kgxyxwfgwmisq3xnk1da0cqv9cx9f"; + }) + ]; + + # NOTE: The upstream README indicates that flex is needed for some features, + # but it actually seems to be unnecessary as of this commit[1]. The detection + # logic for bison and flex is still present in the build script[2], but no + # other code seems to depend on it. This situation is susceptible to change + # though, so it's a good idea to inspect the build scripts periodically. + # + # [1]: https://github.com/apache/trafficserver/pull/5617 + # [2]: https://github.com/apache/trafficserver/blob/3fd2c60/configure.ac#L742-L788 + nativeBuildInputs = [ makeWrapper pkg-config file python3 ] + ++ (with perlPackages; [ perl ExtUtilsMakeMaker ]) + ++ lib.optionals stdenv.isLinux [ linuxHeaders ]; + + buildInputs = [ + openssl + pcre + perlPackages.perl + ] ++ lib.optional withBrotli brotli + ++ lib.optional withCap libcap + ++ lib.optional withCjose cjose + ++ lib.optional withCurl curl + ++ lib.optional withGeoIP geoip + ++ lib.optional withHiredis hiredis + ++ lib.optional withHwloc hwloc + ++ lib.optional withImageMagick imagemagick + ++ lib.optional withJansson jansson + ++ lib.optional withKyotoCabinet kyotocabinet + ++ lib.optional withCurses ncurses + ++ lib.optional withLuaJIT luajit + ++ lib.optional withUnwind libunwind + ++ lib.optional withMaxmindDB libmaxminddb; + + outputs = [ "out" "man" ]; + + postPatch = '' + patchShebangs \ + iocore/aio/test_AIO.sample \ + src/traffic_via/test_traffic_via \ + src/traffic_logstats/tests \ + tools/check-unused-dependencies + + substituteInPlace configure --replace '/usr/bin/file' '${file}/bin/file' + '' + lib.optionalString stdenv.isLinux '' + substituteInPlace configure \ + --replace '/usr/include/linux' '${linuxHeaders}/include/linux' + '' + lib.optionalString stdenv.isDarwin '' + # 'xcrun leaks' probably requires non-free XCode + substituteInPlace iocore/net/test_certlookup.cc \ + --replace 'xcrun leaks' 'true' + ''; + + configureFlags = [ + "--enable-layout=NixOS" + "--enable-experimental-plugins" + (lib.enableFeature enableWCCP "wccp") + + # the configure script can't auto-locate the following from buildInputs + "--with-lzma=${xz.dev}" + "--with-zlib=${zlib.dev}" + (lib.withFeatureAs withHiredis "hiredis" hiredis) + ]; + + installFlags = [ + "pkgsysconfdir=${placeholder "out"}/etc/trafficserver" + + # replace runtime directories with an install-time placeholder directory + "pkgcachedir=${placeholder "out"}/.install-trafficserver" + "pkglocalstatedir=${placeholder "out"}/.install-trafficserver" + "pkglogdir=${placeholder "out"}/.install-trafficserver" + "pkgruntimedir=${placeholder "out"}/.install-trafficserver" + ]; + + postInstall = '' + substituteInPlace rc/trafficserver.service --replace "syslog.target" "" + install -Dm644 rc/trafficserver.service $out/lib/systemd/system/trafficserver.service + + wrapProgram $out/bin/tspush \ + --set PERL5LIB '${with perlPackages; makePerlPath [ URI ]}' \ + --prefix PATH : "${lib.makeBinPath [ file ]}" + + find "$out" -name '*.la' -delete + + # ensure no files actually exist in this directory + rmdir $out/.install-trafficserver + ''; + + installCheckPhase = let + expected = '' + Via header is [uScMsEf p eC:t cCMp sF], Length is 22 + Via Header Details: + Request headers received from client :simple request (not conditional) + Result of Traffic Server cache lookup for URL :miss (a cache "MISS") + Response information received from origin server :error in response + Result of document write-to-cache: :no cache write performed + Proxy operation result :unknown + Error codes (if any) :connection to server failed + Tunnel info :no tunneling + Cache Type :cache + Cache Lookup Result :cache miss (url not in cache) + Parent proxy connection status :no parent proxy or unknown + Origin server connection status :connection open failed + ''; + in '' + runHook preInstallCheck + diff -Naur <($out/bin/traffic_via '[uScMsEf p eC:t cCMp sF]') - <<EOF + ${lib.removeSuffix "\n" expected} + EOF + runHook postInstallCheck + ''; + + doCheck = true; + doInstallCheck = true; + enableParallelBuilding = true; + + passthru.tests = { inherit (nixosTests) trafficserver; }; + + meta = with lib; { + homepage = "https://trafficserver.apache.org"; + changelog = "https://raw.githubusercontent.com/apache/trafficserver/${version}/CHANGELOG-${version}"; + description = "Fast, scalable, and extensible HTTP caching proxy server"; + longDescription = '' + Apache Traffic Server is a high-performance web proxy cache that improves + network efficiency and performance by caching frequently-accessed + information at the edge of the network. This brings content physically + closer to end users, while enabling faster delivery and reduced bandwidth + use. Traffic Server is designed to improve content delivery for + enterprises, Internet service providers (ISPs), backbone providers, and + large intranets by maximizing existing and available bandwidth. + ''; + license = licenses.asl20; + maintainers = with maintainers; [ midchildan ]; + platforms = platforms.unix; + }; +} |
