diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-02-05 10:28:52 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-02-05 10:28:52 +0100 |
commit | 76a439239eb310d9ad76d998b34d5d3bc0e37acb (patch) | |
tree | 69e2f87d4a1ec8f8962d35e330188afcf8f88dcb /pkgs/servers | |
parent | 080f1e7f5c94a171d070d1990104e06880589ca0 (diff) | |
parent | 2b3d2dbaf9f76519082126074b3aae26d2ced67f (diff) | |
download | nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.gz nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.bz2 nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.lz nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.xz nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.zst nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/home-assistant/appdaemon.nix | 27 | ||||
-rw-r--r-- | pkgs/servers/http/nginx/generic.nix | 74 | ||||
-rw-r--r-- | pkgs/servers/http/nginx/mainline.nix | 8 | ||||
-rw-r--r-- | pkgs/servers/http/nginx/modules.nix | 10 | ||||
-rw-r--r-- | pkgs/servers/http/nginx/stable.nix | 4 | ||||
-rw-r--r-- | pkgs/servers/http/openresty/default.nix | 61 | ||||
-rw-r--r-- | pkgs/servers/mail/mailman/web.nix | 2 | ||||
-rw-r--r-- | pkgs/servers/mautrix-telegram/default.nix | 14 | ||||
-rw-r--r-- | pkgs/servers/monitoring/prometheus/xmpp-alerts.nix | 22 | ||||
-rw-r--r-- | pkgs/servers/sql/mariadb/default.nix | 2 |
10 files changed, 119 insertions, 105 deletions
diff --git a/pkgs/servers/home-assistant/appdaemon.nix b/pkgs/servers/home-assistant/appdaemon.nix index 47d9e88999af..258e46db1990 100644 --- a/pkgs/servers/home-assistant/appdaemon.nix +++ b/pkgs/servers/home-assistant/appdaemon.nix @@ -1,18 +1,14 @@ -{ lib, python3 }: +{ lib, python3, fetchFromGitHub }: let python = python3.override { packageOverrides = self: super: { - - aiohttp = super.aiohttp.overridePythonAttrs (oldAttrs: rec { - version = "2.3.10"; + bcrypt = super.bcrypt.overridePythonAttrs (oldAttrs: rec { + version = "3.1.4"; src = oldAttrs.src.override { inherit version; - sha256 = "8adda6583ba438a4c70693374e10b60168663ffa6564c5c75d3c7a9055290964"; + sha256 = "13cyrnqwkhc70rs6dg65z4yrrr3dc42fhk11804fqmci9hvimvb7"; }; - # TODO: remove after pinning aiohttp to a newer version - propagatedBuildInputs = with self; [ chardet multidict async-timeout yarl idna-ssl ]; - doCheck = false; }); yarl = super.yarl.overridePythonAttrs (oldAttrs: rec { @@ -43,23 +39,26 @@ let in python.pkgs.buildPythonApplication rec { pname = "appdaemon"; - version = "3.0.5"; + version = "4.0.1"; - src = python.pkgs.fetchPypi { - inherit pname version; - sha256 = "623897ce08dc2efe24d04380df36e4b7fb35c0e4007e882857d4047f0b60349d"; + src = fetchFromGitHub { + owner = "home-assistant"; + repo = "appdaemon"; + rev = version; + sha256 = "13qzjv11b0c7s1c66j70qmc222a78805n10lv2svj9yyk1v4xhjv"; }; propagatedBuildInputs = with python.pkgs; [ - daemonize astral requests sseclient websocket_client aiohttp yarl jinja2 + daemonize astral requests websocket_client aiohttp yarl jinja2 aiohttp-jinja2 pyyaml voluptuous feedparser iso8601 bcrypt paho-mqtt setuptools + deepdiff dateutil bcrypt python-socketio pid ]; # no tests implemented doCheck = false; postPatch = '' - substituteInPlace setup.py --replace "pyyaml==5.1" "pyyaml" + substituteInPlace requirements.txt --replace "pyyaml==5.1" "pyyaml" ''; meta = with lib; { diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 990d7c5cf134..31a501332fff 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -5,7 +5,20 @@ , withStream ? true , withMail ? false , modules ? [] -, version, sha256, ... +, ... +}: + +{ pname ? "nginx" +, version +, nginxVersion ? version +, src ? null # defaults to upstream nginx ${version} +, sha256 ? null # when not specifying src +, configureFlags ? [] +, buildInputs ? [] +, fixPatch ? p: p +, preConfigure ? "" +, postInstall ? null +, meta ? null }: with stdenv.lib; @@ -16,21 +29,23 @@ let (mod: let supports = mod.supports or (_: true); in - if supports version then mod.${attrPath} or [] - else throw "Module at ${toString mod.src} does not support nginx version ${version}!"); + if supports nginxVersion then mod.${attrPath} or [] + else throw "Module at ${toString mod.src} does not support nginx version ${nginxVersion}!"); in stdenv.mkDerivation { - pname = "nginx"; + inherit pname; inherit version; + inherit nginxVersion; - src = fetchurl { + src = if src != null then src else fetchurl { url = "https://nginx.org/download/nginx-${version}.tar.gz"; inherit sha256; }; buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip perl ] + ++ buildInputs ++ mapModules "inputs"; configureFlags = [ @@ -71,6 +86,7 @@ stdenv.mkDerivation { ] ++ optional (gd != null) "--with-http_image_filter_module" ++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio" + ++ configureFlags ++ map (mod: "--add-module=${mod.src}") modules; NIX_CFLAGS_COMPILE = toString ([ @@ -80,33 +96,35 @@ stdenv.mkDerivation { configurePlatforms = []; - preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules); - - patches = stdenv.lib.singleton (substituteAll { - src = ./nix-etag-1.15.4.patch; - preInstall = '' - export nixStoreDir="$NIX_STORE" nixStoreDirLen="''${#NIX_STORE}" - ''; - }) ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - (fetchpatch { - url = "https://raw.githubusercontent.com/openwrt/packages/master/net/nginx/patches/102-sizeof_test_fix.patch"; - sha256 = "0i2k30ac8d7inj9l6bl0684kjglam2f68z8lf3xggcc2i5wzhh8a"; - }) - (fetchpatch { - url = "https://raw.githubusercontent.com/openwrt/packages/master/net/nginx/patches/101-feature_test_fix.patch"; - sha256 = "0v6890a85aqmw60pgj3mm7g8nkaphgq65dj4v9c6h58wdsrc6f0y"; - }) - (fetchpatch { - url = "https://raw.githubusercontent.com/openwrt/packages/master/net/nginx/patches/103-sys_nerr.patch"; - sha256 = "0s497x6mkz947aw29wdy073k8dyjq8j99lax1a1mzpikzr4rxlmd"; - }) - ] ++ mapModules "patches"; + preConfigure = preConfigure + + concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules; + + patches = map fixPatch + (singleton (substituteAll { + src = ./nix-etag-1.15.4.patch; + preInstall = '' + export nixStoreDir="$NIX_STORE" nixStoreDirLen="''${#NIX_STORE}" + ''; + }) ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + (fetchpatch { + url = "https://raw.githubusercontent.com/openwrt/packages/master/net/nginx/patches/102-sizeof_test_fix.patch"; + sha256 = "0i2k30ac8d7inj9l6bl0684kjglam2f68z8lf3xggcc2i5wzhh8a"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/openwrt/packages/master/net/nginx/patches/101-feature_test_fix.patch"; + sha256 = "0v6890a85aqmw60pgj3mm7g8nkaphgq65dj4v9c6h58wdsrc6f0y"; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/openwrt/packages/master/net/nginx/patches/103-sys_nerr.patch"; + sha256 = "0s497x6mkz947aw29wdy073k8dyjq8j99lax1a1mzpikzr4rxlmd"; + }) + ] ++ mapModules "patches"); hardeningEnable = optional (!stdenv.isDarwin) "pie"; enableParallelBuilding = true; - postInstall = '' + postInstall = if postInstall != null then postInstall else '' mv $out/sbin $out/bin ''; @@ -115,7 +133,7 @@ stdenv.mkDerivation { tests.nginx = nixosTests.nginx; }; - meta = { + meta = if meta != null then meta else { description = "A reverse proxy and lightweight webserver"; homepage = http://nginx.org; license = licenses.bsd2; diff --git a/pkgs/servers/http/nginx/mainline.nix b/pkgs/servers/http/nginx/mainline.nix index c5e0b47e238c..8626dd4a7626 100644 --- a/pkgs/servers/http/nginx/mainline.nix +++ b/pkgs/servers/http/nginx/mainline.nix @@ -1,6 +1,6 @@ { callPackage, ... }@args: -callPackage ./generic.nix (args // { - version = "1.17.3"; - sha256 = "0g0g9prwjy0rnv6n5smny5yl5dhnmflqdr3hwgyj5jpr5hfgx11v"; -}) +callPackage ./generic.nix args { + version = "1.17.8"; + sha256 = "0nwn4md8sxhks2j77qq1nvk5pfz3yykfhh2b507b6l2idp7kxllp"; +} diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix index 78ad5c5582d8..b5282d862af6 100644 --- a/pkgs/servers/http/nginx/modules.nix +++ b/pkgs/servers/http/nginx/modules.nix @@ -20,14 +20,14 @@ in { brotli = { src = let gitsrc = pkgs.fetchFromGitHub { - owner = "eustas"; + owner = "google"; repo = "ngx_brotli"; - rev = "v0.1.2"; - sha256 = "19r9igxm4hrzrhxajlxw2ccq0057h8ipkfiif725x0xqbxjskl6c"; + rev = "e505dce68acc190cc5a1e780a3b0275e39f160ca"; + sha256 = "00j48lffki62y1nmjyy81iklw5nlyzvrjy3z04qch4fp3p57hwla"; }; in pkgs.runCommandNoCC "ngx_brotli-src" {} '' cp -a ${gitsrc} $out - substituteInPlace $out/config \ - --replace /usr/local ${lib.getDev pkgs.brotli} + substituteInPlace $out/filter/config \ + --replace '$ngx_addon_dir/deps/brotli/c' ${lib.getDev pkgs.brotli} ''; inputs = [ pkgs.brotli ]; }; diff --git a/pkgs/servers/http/nginx/stable.nix b/pkgs/servers/http/nginx/stable.nix index 31aeaa6f0843..001ea60839a2 100644 --- a/pkgs/servers/http/nginx/stable.nix +++ b/pkgs/servers/http/nginx/stable.nix @@ -1,6 +1,6 @@ { callPackage, ... } @ args: -callPackage ./generic.nix (args // { +callPackage ./generic.nix args { version = "1.16.1"; sha256 = "0az3vf463b538ajvaq94hsz9ipmjgnamfj1jy0v5flfks5njl77i"; -}) +} diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix index 328db9ec9861..55e813a2ce72 100644 --- a/pkgs/servers/http/openresty/default.nix +++ b/pkgs/servers/http/openresty/default.nix @@ -1,52 +1,35 @@ -{ stdenv, fetchurl, openssl, zlib, pcre, postgresql, libxml2, libxslt, -gd, geoip, perl }: - -with stdenv.lib; - -stdenv.mkDerivation rec { +{ callPackage +, runCommand +, lib +, fetchurl +, postgresql +, ... +}@args: + +callPackage ../nginx/generic.nix args rec { pname = "openresty"; - version = "1.15.8.2"; + nginxVersion = "1.15.8"; + version = "${nginxVersion}.2"; src = fetchurl { url = "https://openresty.org/download/openresty-${version}.tar.gz"; sha256 = "05jxrb8hv758nm38jil8n63q1nhrz3d249bsrwc7maa7sn24wss3"; }; - buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip postgresql ]; - nativeBuildInputs = [ perl ]; + fixPatch = patch: + runCommand "openresty-${patch.name}" { src = patch; } '' + substitute $src $out \ + --replace "src/" "bundle/nginx-${nginxVersion}/src/" + ''; - NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; + buildInputs = [ postgresql ]; + + configureFlags = [ "--with-http_postgres_module" ]; preConfigure = '' patchShebangs . ''; - configureFlags = [ - "--with-pcre-jit" - "--with-http_ssl_module" - "--with-http_v2_module" - "--with-http_realip_module" - "--with-http_addition_module" - "--with-http_xslt_module" - "--with-http_image_filter_module" - "--with-http_geoip_module" - "--with-http_sub_module" - "--with-http_dav_module" - "--with-http_flv_module" - "--with-http_mp4_module" - "--with-http_gunzip_module" - "--with-http_gzip_static_module" - "--with-http_auth_request_module" - "--with-http_random_index_module" - "--with-http_secure_link_module" - "--with-http_degradation_module" - "--with-http_stub_status_module" - "--with-http_postgres_module" - "--with-ipv6" - ]; - - enableParallelBuilding = true; - postInstall = '' ln -s $out/luajit/bin/luajit-2.1.0-beta3 $out/bin/luajit-openresty ln -s $out/nginx/sbin/nginx $out/bin/nginx @@ -55,8 +38,8 @@ stdenv.mkDerivation rec { meta = { description = "A fast web application server built on Nginx"; homepage = http://openresty.org; - license = licenses.bsd2; - platforms = platforms.all; - maintainers = with maintainers; [ thoughtpolice lblasc ]; + license = lib.licenses.bsd2; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ thoughtpolice lblasc emily ]; }; } diff --git a/pkgs/servers/mail/mailman/web.nix b/pkgs/servers/mail/mailman/web.nix index 408840c3f934..4586c3d0fdf7 100644 --- a/pkgs/servers/mail/mailman/web.nix +++ b/pkgs/servers/mail/mailman/web.nix @@ -34,6 +34,6 @@ buildPythonPackage rec { meta = with lib; { description = "Django project for Mailman 3 web interface"; license = licenses.gpl3; - maintainers = with maintainers; [ qyliss ]; + maintainers = with maintainers; [ peti qyliss ]; }; } diff --git a/pkgs/servers/mautrix-telegram/default.nix b/pkgs/servers/mautrix-telegram/default.nix index 5089acc2a0f3..73a008d3fe7c 100644 --- a/pkgs/servers/mautrix-telegram/default.nix +++ b/pkgs/servers/mautrix-telegram/default.nix @@ -1,25 +1,17 @@ -{ lib, python3, mautrix-telegram, fetchpatch }: +{ lib, python3, mautrix-telegram }: with python3.pkgs; buildPythonPackage rec { pname = "mautrix-telegram"; - version = "0.7.0"; + version = "0.7.1"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "0xzivcn1s5j2nn9p7li9bzr0h225bnli4fr3yrh8v7npx2ymg1r3"; + sha256 = "1yi4h37lhlpa095hzd0gwn1ifbycq8878kj5n2sjhw8kk6nblda9"; }; - patches = [ - # fix tests - (fetchpatch { - url = "https://github.com/tulir/mautrix-telegram/commit/fe52f0ad106122f08af72e356c4c62bb8875b453.patch"; - sha256 = "0r7j7q78brqqx0rkchld328k00yq0ykdk7syvwpihqzj3gchacb7"; - }) - ]; - postPatch = '' sed -i -e '/alembic>/d' setup.py substituteInPlace setup.py \ diff --git a/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix b/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix new file mode 100644 index 000000000000..93e6f1767ada --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/xmpp-alerts.nix @@ -0,0 +1,22 @@ +{ lib, fetchFromGitHub, pythonPackages }: + +pythonPackages.buildPythonApplication rec { + pname = "prometheus-xmpp-alerts"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "jelmer"; + repo = pname; + rev = version; + sha256 = "17aq6v4ahnga82r350kx1y8i7zgikpzmwzaacj7a339kh8hxkh63"; + }; + + propagatedBuildInputs = with pythonPackages; [ slixmpp prometheus_client pyyaml ]; + + meta = { + description = "XMPP Web hook for Prometheus"; + homepage = "https://github.com/jelmer/prometheus-xmpp-alerts"; + maintainers = with lib.maintainers; [ fpletz ]; + license = with lib.licenses; [ asl20 ]; + }; +} diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index d451c1dab5c9..c86ed3defbcc 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -194,7 +194,7 @@ server = stdenv.mkDerivation (common // { # perlPackages.DBDmysql is broken on darwin postFixup = optionalString (!stdenv.hostPlatform.isDarwin) '' - wrapProgram $out/bin/mytop --set PATH ${less}/bin/less + wrapProgram $out/bin/mytop --set PATH ${makeBinPath [ less ncurses ]} ''; CXXFLAGS = optionalString stdenv.hostPlatform.isi686 "-fpermissive"; |