From e7947f3efb269cac7bcb075986e88d28b80a3831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 24 Apr 2021 08:58:47 +0200 Subject: [PATCH 01/30] prometheus-unbound-exporter: init at unstable-2021-03-17 --- .../prometheus/unbound-exporter.nix | 26 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/unbound-exporter.nix diff --git a/pkgs/servers/monitoring/prometheus/unbound-exporter.nix b/pkgs/servers/monitoring/prometheus/unbound-exporter.nix new file mode 100644 index 00000000000..c085226d909 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/unbound-exporter.nix @@ -0,0 +1,26 @@ +{ lib, rustPlatform, fetchFromGitHub, openssl, pkg-config }: + +rustPlatform.buildRustPackage rec { + pname = "unbound-telemetry"; + version = "unstable-2021-03-17"; + + src = fetchFromGitHub { + owner = "svartalf"; + repo = pname; + rev = "7f1b6d4e9e4b6a3216a78c23df745bcf8fc84021"; + sha256 = "xCelL6WGaTRhDJkkUdpdwj1zcKKAU2dyUv3mHeI4oAw="; + }; + + cargoSha256 = "P3nAtYOuwNSLMP7q1L5zKTsZ6rJA/qL1mhVHzP3szi4="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl ]; + + meta = with lib; { + description = "Prometheus exporter for Unbound DNS resolver"; + homepage = "https://github.com/svartalf/unbound-telemetry"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6915f6bcf84..b6ecedd2f33 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19110,6 +19110,7 @@ in prometheus-tor-exporter = callPackage ../servers/monitoring/prometheus/tor-exporter.nix { }; prometheus-statsd-exporter = callPackage ../servers/monitoring/prometheus/statsd-exporter.nix { }; prometheus-surfboard-exporter = callPackage ../servers/monitoring/prometheus/surfboard-exporter.nix { }; + prometheus-unbound-exporter = callPackage ../servers/monitoring/prometheus/unbound-exporter.nix { }; prometheus-unifi-exporter = callPackage ../servers/monitoring/prometheus/unifi-exporter { }; prometheus-varnish-exporter = callPackage ../servers/monitoring/prometheus/varnish-exporter.nix { }; prometheus-jmx-httpserver = callPackage ../servers/monitoring/prometheus/jmx-httpserver.nix { }; From 8ee00e6ca2910e1498d74750b55520de47c1b3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 24 Apr 2021 09:11:00 +0200 Subject: [PATCH 02/30] nixos/kresd: allow package to be configured --- nixos/modules/services/networking/kresd.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/networking/kresd.nix b/nixos/modules/services/networking/kresd.nix index 3f9be6172f1..86709874065 100644 --- a/nixos/modules/services/networking/kresd.nix +++ b/nixos/modules/services/networking/kresd.nix @@ -29,8 +29,6 @@ let + concatMapStrings (mkListen "doh2") cfg.listenDoH + cfg.extraConfig ); - - package = pkgs.knot-resolver; in { meta.maintainers = [ maintainers.vcunat /* upstream developer */ ]; @@ -58,6 +56,13 @@ in { and give commands interactively to kresd@1.service. ''; }; + package = mkOption { + default = pkgs.knot-resolver; + type = types.package; + description = " + knot-resolver package to use. + "; + }; extraConfig = mkOption { type = types.lines; default = ""; @@ -115,7 +120,7 @@ in { }; users.groups.knot-resolver.gid = null; - systemd.packages = [ package ]; # the units are patched inside the package a bit + systemd.packages = [ cfg.package ]; # the units are patched inside the package a bit systemd.targets.kresd = { # configure units started by default wantedBy = [ "multi-user.target" ]; @@ -123,8 +128,8 @@ in { ++ map (i: "kresd@${toString i}.service") (range 1 cfg.instances); }; systemd.services."kresd@".serviceConfig = { - ExecStart = "${package}/bin/kresd --noninteractive " - + "-c ${package}/lib/knot-resolver/distro-preconfig.lua -c ${configFile}"; + ExecStart = "${cfg.package}/bin/kresd --noninteractive " + + "-c ${cfg.package}/lib/knot-resolver/distro-preconfig.lua -c ${configFile}"; # Ensure /run/knot-resolver exists RuntimeDirectory = "knot-resolver"; RuntimeDirectoryMode = "0770"; From 11cc6158710f5b4876cc93d262837c6a909fe400 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 27 Apr 2021 04:43:50 +0000 Subject: [PATCH 03/30] kanboard: 1.2.18 -> 1.2.19 --- pkgs/applications/misc/kanboard/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/kanboard/default.nix b/pkgs/applications/misc/kanboard/default.nix index ffb787a9bd9..6dd407ab551 100644 --- a/pkgs/applications/misc/kanboard/default.nix +++ b/pkgs/applications/misc/kanboard/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "kanboard"; - version = "1.2.18"; + version = "1.2.19"; src = fetchFromGitHub { owner = "kanboard"; repo = "kanboard"; rev = "v${version}"; - sha256 = "sha256-raXPRoydd3CfciF7S0cZiuY7EPFKfE8IU3qj2dOztHU="; + sha256 = "sha256-48U3eRg6obRjgK06SKN2g1+0wocqm2aGyXO2yZw5fs8="; }; dontBuild = true; From a4749b11d4eef29b07c33d3036ca7e06a990cb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 27 Apr 2021 21:38:30 +0200 Subject: [PATCH 04/30] nixos/kresd.package: improve the generated docs --- nixos/modules/services/networking/kresd.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/kresd.nix b/nixos/modules/services/networking/kresd.nix index 86709874065..9b94c390e98 100644 --- a/nixos/modules/services/networking/kresd.nix +++ b/nixos/modules/services/networking/kresd.nix @@ -57,11 +57,13 @@ in { ''; }; package = mkOption { - default = pkgs.knot-resolver; type = types.package; description = " knot-resolver package to use. "; + default = pkgs.knot-resolver; + defaultText = "pkgs.knot-resolver"; + example = literalExample "pkgs.knot-resolver.override { extraFeatures = true; }"; }; extraConfig = mkOption { type = types.lines; From e6ce32f74347065c1c043be641236478bd805b84 Mon Sep 17 00:00:00 2001 From: Enno Richter Date: Wed, 28 Apr 2021 11:21:23 +0200 Subject: [PATCH 05/30] xdg-desktop-portal-wlr: 0.2.0 -> 0.3.0 --- .../libraries/xdg-desktop-portal-wlr/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/xdg-desktop-portal-wlr/default.nix b/pkgs/development/libraries/xdg-desktop-portal-wlr/default.nix index da60f2b27fc..b51d179f95c 100644 --- a/pkgs/development/libraries/xdg-desktop-portal-wlr/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal-wlr/default.nix @@ -1,20 +1,20 @@ { lib, stdenv, fetchFromGitHub , meson, ninja, pkg-config, wayland-protocols -, pipewire, wayland, systemd, libdrm }: +, pipewire, wayland, systemd, libdrm, iniparser, scdoc }: stdenv.mkDerivation rec { pname = "xdg-desktop-portal-wlr"; - version = "0.2.0"; + version = "0.3.0"; src = fetchFromGitHub { owner = "emersion"; repo = pname; rev = "v${version}"; - sha256 = "1vjz0y3ib1xw25z8hl679l2p6g4zcg7b8fcd502bhmnqgwgdcsfx"; + sha256 = "sha256-6ArUQfWx5rNdpsd8Q22MqlpxLT8GTSsymAf21zGe1KI="; }; nativeBuildInputs = [ meson ninja pkg-config wayland-protocols ]; - buildInputs = [ pipewire wayland systemd libdrm ]; + buildInputs = [ pipewire wayland systemd libdrm iniparser scdoc ]; mesonFlags = [ "-Dsd-bus-provider=libsystemd" From b21d1ae87235b2adf2bdc1e1204d9a8219f32779 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Wed, 28 Apr 2021 15:19:19 +0000 Subject: [PATCH 06/30] jre_minimal: add 2 simple tests --- pkgs/development/compilers/openjdk/jre.nix | 5 ++ .../compilers/openjdk/jre_minimal_test1.nix | 16 +++++++ .../compilers/openjdk/tests/hello-logging.nix | 47 +++++++++++++++++++ .../compilers/openjdk/tests/hello.nix | 42 +++++++++++++++++ .../openjdk/tests/test_jre_minimal.nix | 16 +++++++ .../tests/test_jre_minimal_with_logging.nix | 21 +++++++++ 6 files changed, 147 insertions(+) create mode 100644 pkgs/development/compilers/openjdk/jre_minimal_test1.nix create mode 100644 pkgs/development/compilers/openjdk/tests/hello-logging.nix create mode 100644 pkgs/development/compilers/openjdk/tests/hello.nix create mode 100644 pkgs/development/compilers/openjdk/tests/test_jre_minimal.nix create mode 100644 pkgs/development/compilers/openjdk/tests/test_jre_minimal_with_logging.nix diff --git a/pkgs/development/compilers/openjdk/jre.nix b/pkgs/development/compilers/openjdk/jre.nix index 436bd0468c5..78dec7885d9 100644 --- a/pkgs/development/compilers/openjdk/jre.nix +++ b/pkgs/development/compilers/openjdk/jre.nix @@ -1,6 +1,7 @@ { stdenv , jdk , lib +, callPackage , modules ? [ "java.base" ] }: @@ -29,6 +30,10 @@ let passthru = { home = "${jre}"; + tests = [ + (callPackage ./tests/test_jre_minimal.nix {}) + (callPackage ./tests/test_jre_minimal_with_logging.nix {}) + ]; }; }; in jre diff --git a/pkgs/development/compilers/openjdk/jre_minimal_test1.nix b/pkgs/development/compilers/openjdk/jre_minimal_test1.nix new file mode 100644 index 00000000000..eebd11fb2fd --- /dev/null +++ b/pkgs/development/compilers/openjdk/jre_minimal_test1.nix @@ -0,0 +1,16 @@ +{ runCommand +, callPackage +, jdk +, jre_minimal +}: + +let + hello = callPackage tests/hello.nix { + jdk = jdk; + jre = jre_minimal; + }; +in + runCommand "test" {} '' + ${hello}/bin/hello | grep "Hello, world!" + touch $out + '' diff --git a/pkgs/development/compilers/openjdk/tests/hello-logging.nix b/pkgs/development/compilers/openjdk/tests/hello-logging.nix new file mode 100644 index 00000000000..71f3a5543f7 --- /dev/null +++ b/pkgs/development/compilers/openjdk/tests/hello-logging.nix @@ -0,0 +1,47 @@ +{ jdk +, jre +, pkgs +}: + +/* 'Hello world' Java application derivation for use in tests */ +let + source = pkgs.writeTextDir "src/Hello.java" '' + import java.util.logging.Logger; + import java.util.logging.Level; + + class Hello { + static Logger logger = Logger.getLogger(Hello.class.getName()); + + public static void main(String[] args) { + logger.log(Level.INFO, "Hello, world!"); + } + } + ''; +in + pkgs.stdenv.mkDerivation { + pname = "hello"; + version = "1.0.0"; + + src = source; + + buildPhase = '' + runHook preBuildPhase + ${jdk}/bin/javac src/Hello.java + runHook postBuildPhase + ''; + installPhase = '' + runHook preInstallPhase + + mkdir -p $out/lib + cp src/Hello.class $out/lib + + mkdir -p $out/bin + cat >$out/bin/hello <$out/bin/hello </dev/stdout | grep "Hello, world!" + touch $out + '' From b753f7a49de7a557b63ef25ef0e5ddbdf95bc1a0 Mon Sep 17 00:00:00 2001 From: skykanin <3789764+skykanin@users.noreply.github.com> Date: Wed, 28 Apr 2021 22:26:45 +0200 Subject: [PATCH 07/30] mailspring: fix build --- pkgs/applications/networking/mailreaders/mailspring/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/networking/mailreaders/mailspring/default.nix b/pkgs/applications/networking/mailreaders/mailspring/default.nix index a27f3c87e03..29667eb52c6 100644 --- a/pkgs/applications/networking/mailreaders/mailspring/default.nix +++ b/pkgs/applications/networking/mailreaders/mailspring/default.nix @@ -39,6 +39,7 @@ stdenv.mkDerivation rec { libsecret nss xorg.libxkbfile + xorg.libXdamage xorg.libXScrnSaver xorg.libXtst ]; From 716d176974034d6bf52c1418f9e35fc2a5474f78 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 28 Apr 2021 23:18:29 +0200 Subject: [PATCH 08/30] chromiumBeta: 91.0.4472.19 -> 91.0.4472.27 --- .../networking/browsers/chromium/upstream-info.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.json b/pkgs/applications/networking/browsers/chromium/upstream-info.json index c9ec1931c54..e5bcab4740e 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.json +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.json @@ -18,9 +18,9 @@ } }, "beta": { - "version": "91.0.4472.19", - "sha256": "0p51cxz0dm9ss9k7b91c0nd560mgi2x4qdcpg12vdf8x24agai5x", - "sha256bin64": "0pf0sw8sskv4x057w7l6jh86q5mdvm800iikzy6fvambhh7bvd1i", + "version": "91.0.4472.27", + "sha256": "09mhrzfza9a2zfsnxskbdbk9cwxnswgprhnyv3pj0f215cva20sq", + "sha256bin64": "1iwjf993pmhm9r92h4hskfxqc9fhky3aabvmdsqys44251j3hvwg", "deps": { "gn": { "version": "2021-04-06", From 84b65960985d578741a1de6e94caa42561aa301d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Apr 2021 03:39:40 +0200 Subject: [PATCH 09/30] bind: 9.16.13 -> 9.16.15 https://kb.isc.org/docs/cve-2021-25214 https://kb.isc.org/docs/cve-2021-25215 https://kb.isc.org/docs/cve-2021-25216 Fixes: CVE-2021-25214, CVE-2021-25215, CVE-2021-25216 --- pkgs/servers/dns/bind/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix index 5077ff98ecf..99366d24439 100644 --- a/pkgs/servers/dns/bind/default.nix +++ b/pkgs/servers/dns/bind/default.nix @@ -10,11 +10,11 @@ assert enablePython -> python3 != null; stdenv.mkDerivation rec { pname = "bind"; - version = "9.16.13"; + version = "9.16.15"; src = fetchurl { url = "https://downloads.isc.org/isc/bind9/${version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-pUzHk/pbabNfYQ8glXYPgjjf9c/VJBn37hycIn2kzAg="; + sha256 = "0fbqisrh84f8wszm94cqp7v8q9r7pql3qyzbay7vz9vqv0rg9dlq"; }; outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ]; From ba13dc0652697b6bb05d6977d94271ea0d110de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 24 Apr 2021 08:59:32 +0200 Subject: [PATCH 10/30] nixos/prometheus: add unbound exporter --- .../monitoring/prometheus/exporters.nix | 1 + .../prometheus/exporters/unbound.nix | 59 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/unbound.nix diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index e0c5ceccfcc..ce7c215fd14 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -59,6 +59,7 @@ let "surfboard" "systemd" "tor" + "unbound" "unifi" "unifi-poller" "varnish" diff --git a/nixos/modules/services/monitoring/prometheus/exporters/unbound.nix b/nixos/modules/services/monitoring/prometheus/exporters/unbound.nix new file mode 100644 index 00000000000..56a559531c1 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/unbound.nix @@ -0,0 +1,59 @@ +{ config, lib, pkgs, options }: + +with lib; + +let + cfg = config.services.prometheus.exporters.unbound; +in +{ + port = 9167; + extraOpts = { + fetchType = mkOption { + # TODO: add shm when upstream implemented it + type = types.enum [ "tcp" "uds" ]; + default = "uds"; + description = '' + Which methods the exporter uses to get the information from unbound. + ''; + }; + + telemetryPath = mkOption { + type = types.str; + default = "/metrics"; + description = '' + Path under which to expose metrics. + ''; + }; + + controlInterface = mkOption { + type = types.nullOr types.str; + default = null; + example = "/run/unbound/unbound.socket"; + description = '' + Path to the unbound socket for uds mode or the control interface port for tcp mode. + + Example: + uds-mode: /run/unbound/unbound.socket + tcp-mode: 127.0.0.1:8953 + ''; + }; + }; + + serviceOpts = mkMerge ([{ + serviceConfig = { + ExecStart = '' + ${pkgs.prometheus-unbound-exporter}/bin/unbound-telemetry \ + ${cfg.fetchType} \ + --bind ${cfg.listenAddress}:${toString cfg.port} \ + --path ${cfg.telemetryPath} \ + ${optionalString (cfg.controlInterface != null) "--control-interface ${cfg.controlInterface}"} \ + ${toString cfg.extraFlags} + ''; + }; + }] ++ [ + (mkIf config.services.unbound.enable { + after = [ "unbound.service" ]; + requires = [ "unbound.service" ]; + }) + ]); +} From da858b16b88cad1ed67662b0fa6f483bb665d498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 29 Apr 2021 06:00:45 +0200 Subject: [PATCH 11/30] nixos/tests/prometheus-exporters: add unbound test Author: WilliButz --- nixos/tests/prometheus-exporters.nix | 23 +++++++++++++++++++ .../prometheus/unbound-exporter.nix | 6 ++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 62c0080dd51..55fe7db4db3 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -1000,6 +1000,29 @@ let ''; }; + unbound = { + exporterConfig = { + enable = true; + fetchType = "uds"; + controlInterface = "/run/unbound/unbound.ctl"; + }; + metricProvider = { + services.unbound = { + enable = true; + localControlSocketPath = "/run/unbound/unbound.ctl"; + }; + systemd.services.prometheus-unbound-exporter.serviceConfig = { + SupplementaryGroups = [ "unbound" ]; + }; + }; + exporterTest = '' + wait_for_unit("unbound.service") + wait_for_unit("prometheus-unbound-exporter.service") + wait_for_open_port(9167) + succeed("curl -sSf localhost:9167/metrics | grep -q 'unbound_up 1'") + ''; + }; + varnish = { exporterConfig = { enable = true; diff --git a/pkgs/servers/monitoring/prometheus/unbound-exporter.nix b/pkgs/servers/monitoring/prometheus/unbound-exporter.nix index c085226d909..6b26379bf26 100644 --- a/pkgs/servers/monitoring/prometheus/unbound-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/unbound-exporter.nix @@ -1,4 +1,4 @@ -{ lib, rustPlatform, fetchFromGitHub, openssl, pkg-config }: +{ lib, rustPlatform, fetchFromGitHub, openssl, pkg-config, nixosTests }: rustPlatform.buildRustPackage rec { pname = "unbound-telemetry"; @@ -17,6 +17,10 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ]; + passthru.tests = { + inherit (nixosTests.prometheus-exporters) unbound; + }; + meta = with lib; { description = "Prometheus exporter for Unbound DNS resolver"; homepage = "https://github.com/svartalf/unbound-telemetry"; From d3fe53a8a6a3a27f79d8e5916563b841e5e002db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 29 Apr 2021 06:01:12 +0200 Subject: [PATCH 12/30] nixos/tests/prometheus-exporters: nixpkgs-fmt --- nixos/tests/prometheus-exporters.nix | 308 ++++++++++++++------------- 1 file changed, 160 insertions(+), 148 deletions(-) diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 55fe7db4db3..0b6f80b5dc1 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -1,65 +1,65 @@ { system ? builtins.currentSystem -, config ? {} +, config ? { } , pkgs ? import ../.. { inherit system config; } }: let inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest; inherit (pkgs.lib) concatStringsSep maintainers mapAttrs mkMerge - removeSuffix replaceChars singleton splitString; + removeSuffix replaceChars singleton splitString; -/* - * The attrset `exporterTests` contains one attribute - * for each exporter test. Each of these attributes - * is expected to be an attrset containing: - * - * `exporterConfig`: - * this attribute set contains config for the exporter itself - * - * `exporterTest` - * this attribute set contains test instructions - * - * `metricProvider` (optional) - * this attribute contains additional machine config - * - * `nodeName` (optional) - * override an incompatible testnode name - * - * Example: - * exporterTests. = { - * exporterConfig = { - * enable = true; - * }; - * metricProvider = { - * services..enable = true; - * }; - * exporterTest = '' - * wait_for_unit("prometheus--exporter.service") - * wait_for_open_port("1234") - * succeed("curl -sSf 'localhost:1234/metrics'") - * ''; - * }; - * - * # this would generate the following test config: - * - * nodes. = { - * services.prometheus. = { - * enable = true; - * }; - * services..enable = true; - * }; - * - * testScript = '' - * .start() - * .wait_for_unit("prometheus--exporter.service") - * .wait_for_open_port("1234") - * .succeed("curl -sSf 'localhost:1234/metrics'") - * .shutdown() - * ''; - */ + /* + * The attrset `exporterTests` contains one attribute + * for each exporter test. Each of these attributes + * is expected to be an attrset containing: + * + * `exporterConfig`: + * this attribute set contains config for the exporter itself + * + * `exporterTest` + * this attribute set contains test instructions + * + * `metricProvider` (optional) + * this attribute contains additional machine config + * + * `nodeName` (optional) + * override an incompatible testnode name + * + * Example: + * exporterTests. = { + * exporterConfig = { + * enable = true; + * }; + * metricProvider = { + * services..enable = true; + * }; + * exporterTest = '' + * wait_for_unit("prometheus--exporter.service") + * wait_for_open_port("1234") + * succeed("curl -sSf 'localhost:1234/metrics'") + * ''; + * }; + * + * # this would generate the following test config: + * + * nodes. = { + * services.prometheus. = { + * enable = true; + * }; + * services..enable = true; + * }; + * + * testScript = '' + * .start() + * .wait_for_unit("prometheus--exporter.service") + * .wait_for_open_port("1234") + * .succeed("curl -sSf 'localhost:1234/metrics'") + * .shutdown() + * ''; + */ exporterTests = { - apcupsd = { + apcupsd = { exporterConfig = { enable = true; }; @@ -188,20 +188,21 @@ let "plugin":"testplugin", "time":DATE }] - ''; in '' - wait_for_unit("prometheus-collectd-exporter.service") - wait_for_open_port(9103) - succeed( - 'echo \'${postData}\'> /tmp/data.json' - ) - succeed('sed -ie "s DATE $(date +%s) " /tmp/data.json') - succeed( - "curl -sSfH 'Content-Type: application/json' -X POST --data @/tmp/data.json localhost:9103/collectd" - ) - succeed( - "curl -sSf localhost:9103/metrics | grep -q 'collectd_testplugin_gauge{instance=\"testhost\"} 23'" - ) - ''; + ''; in + '' + wait_for_unit("prometheus-collectd-exporter.service") + wait_for_open_port(9103) + succeed( + 'echo \'${postData}\'> /tmp/data.json' + ) + succeed('sed -ie "s DATE $(date +%s) " /tmp/data.json') + succeed( + "curl -sSfH 'Content-Type: application/json' -X POST --data @/tmp/data.json localhost:9103/collectd" + ) + succeed( + "curl -sSf localhost:9103/metrics | grep -q 'collectd_testplugin_gauge{instance=\"testhost\"} 23'" + ) + ''; }; dnsmasq = { @@ -254,7 +255,8 @@ let ''; }; - fritzbox = { # TODO add proper test case + fritzbox = { + # TODO add proper test case exporterConfig = { enable = true; }; @@ -373,19 +375,19 @@ let ''; systemd.services.lnd = { serviceConfig.ExecStart = '' - ${pkgs.lnd}/bin/lnd \ - --datadir=/var/lib/lnd \ - --tlscertpath=/var/lib/lnd/tls.cert \ - --tlskeypath=/var/lib/lnd/tls.key \ - --logdir=/var/log/lnd \ - --bitcoin.active \ - --bitcoin.mainnet \ - --bitcoin.node=bitcoind \ - --bitcoind.rpcuser=bitcoinrpc \ - --bitcoind.rpcpass=hunter2 \ - --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 \ - --bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333 \ - --readonlymacaroonpath=/var/lib/lnd/readonly.macaroon + ${pkgs.lnd}/bin/lnd \ + --datadir=/var/lib/lnd \ + --tlscertpath=/var/lib/lnd/tls.cert \ + --tlskeypath=/var/lib/lnd/tls.key \ + --logdir=/var/log/lnd \ + --bitcoin.active \ + --bitcoin.mainnet \ + --bitcoin.node=bitcoind \ + --bitcoind.rpcuser=bitcoinrpc \ + --bitcoind.rpcpass=hunter2 \ + --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 \ + --bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333 \ + --readonlymacaroonpath=/var/lib/lnd/readonly.macaroon ''; serviceConfig.StateDirectory = "lnd"; wantedBy = [ "multi-user.target" ]; @@ -407,14 +409,14 @@ let configuration = { monitoringInterval = "2s"; mailCheckTimeout = "10s"; - servers = [ { + servers = [{ name = "testserver"; server = "localhost"; port = 25; from = "mail-exporter@localhost"; to = "mail-exporter@localhost"; detectionDir = "/var/spool/mail/mail-exporter/new"; - } ]; + }]; }; }; metricProvider = { @@ -516,15 +518,17 @@ let url = "http://localhost"; }; metricProvider = { - systemd.services.nc-pwfile = let - passfile = (pkgs.writeText "pwfile" "snakeoilpw"); - in { - requiredBy = [ "prometheus-nextcloud-exporter.service" ]; - before = [ "prometheus-nextcloud-exporter.service" ]; - serviceConfig.ExecStart = '' - ${pkgs.coreutils}/bin/install -o nextcloud-exporter -m 0400 ${passfile} /var/nextcloud-pwfile - ''; - }; + systemd.services.nc-pwfile = + let + passfile = (pkgs.writeText "pwfile" "snakeoilpw"); + in + { + requiredBy = [ "prometheus-nextcloud-exporter.service" ]; + before = [ "prometheus-nextcloud-exporter.service" ]; + serviceConfig.ExecStart = '' + ${pkgs.coreutils}/bin/install -o nextcloud-exporter -m 0400 ${passfile} /var/nextcloud-pwfile + ''; + }; services.nginx = { enable = true; virtualHosts."localhost" = { @@ -581,7 +585,7 @@ let syslog = { listen_address = "udp://127.0.0.1:10000"; format = "rfc3164"; - tags = ["nginx"]; + tags = [ "nginx" ]; }; }; } @@ -701,10 +705,10 @@ let exporterConfig = { enable = true; group = "openvpn"; - statusPaths = ["/run/openvpn-test"]; + statusPaths = [ "/run/openvpn-test" ]; }; metricProvider = { - users.groups.openvpn = {}; + users.groups.openvpn = { }; services.openvpn.servers.test = { config = '' dev tun @@ -824,19 +828,21 @@ let }; metricProvider = { # Mock rtl_433 binary to return a dummy metric stream. - nixpkgs.overlays = [ (self: super: { - rtl_433 = self.runCommand "rtl_433" {} '' - mkdir -p "$out/bin" - cat < "$out/bin/rtl_433" - #!/bin/sh - while true; do - printf '{"time" : "2020-04-26 13:37:42", "model" : "zopieux", "id" : 55, "channel" : 3, "temperature_C" : 18.000}\n' - sleep 4 - done - EOF - chmod +x "$out/bin/rtl_433" - ''; - }) ]; + nixpkgs.overlays = [ + (self: super: { + rtl_433 = self.runCommand "rtl_433" { } '' + mkdir -p "$out/bin" + cat < "$out/bin/rtl_433" + #!/bin/sh + while true; do + printf '{"time" : "2020-04-26 13:37:42", "model" : "zopieux", "id" : 55, "channel" : 3, "temperature_C" : 18.000}\n' + sleep 4 + done + EOF + chmod +x "$out/bin/rtl_433" + ''; + }) + ]; }; exporterTest = '' wait_for_unit("prometheus-rtl_433-exporter.service") @@ -852,7 +858,7 @@ let smokeping = { exporterConfig = { enable = true; - hosts = ["127.0.0.1"]; + hosts = [ "127.0.0.1" ]; }; exporterTest = '' wait_for_unit("prometheus-smokeping-exporter.service") @@ -990,7 +996,7 @@ let unifi-poller = { nodeName = "unifi_poller"; exporterConfig.enable = true; - exporterConfig.controllers = [ { } ]; + exporterConfig.controllers = [{ }]; exporterTest = '' wait_for_unit("prometheus-unifi-poller-exporter.service") wait_for_open_port(9130) @@ -1052,54 +1058,60 @@ let ''; }; - wireguard = let snakeoil = import ./wireguard/snakeoil-keys.nix; in { - exporterConfig.enable = true; - metricProvider = { - networking.wireguard.interfaces.wg0 = { - ips = [ "10.23.42.1/32" "fc00::1/128" ]; - listenPort = 23542; + wireguard = let snakeoil = import ./wireguard/snakeoil-keys.nix; in + { + exporterConfig.enable = true; + metricProvider = { + networking.wireguard.interfaces.wg0 = { + ips = [ "10.23.42.1/32" "fc00::1/128" ]; + listenPort = 23542; - inherit (snakeoil.peer0) privateKey; + inherit (snakeoil.peer0) privateKey; - peers = singleton { - allowedIPs = [ "10.23.42.2/32" "fc00::2/128" ]; + peers = singleton { + allowedIPs = [ "10.23.42.2/32" "fc00::2/128" ]; - inherit (snakeoil.peer1) publicKey; + inherit (snakeoil.peer1) publicKey; + }; }; + systemd.services.prometheus-wireguard-exporter.after = [ "wireguard-wg0.service" ]; }; - systemd.services.prometheus-wireguard-exporter.after = [ "wireguard-wg0.service" ]; + exporterTest = '' + wait_for_unit("prometheus-wireguard-exporter.service") + wait_for_open_port(9586) + wait_until_succeeds( + "curl -sSf http://localhost:9586/metrics | grep '${snakeoil.peer1.publicKey}'" + ) + ''; }; - exporterTest = '' - wait_for_unit("prometheus-wireguard-exporter.service") - wait_for_open_port(9586) - wait_until_succeeds( - "curl -sSf http://localhost:9586/metrics | grep '${snakeoil.peer1.publicKey}'" - ) - ''; - }; }; in -mapAttrs (exporter: testConfig: (makeTest (let - nodeName = testConfig.nodeName or exporter; +mapAttrs + (exporter: testConfig: (makeTest ( + let + nodeName = testConfig.nodeName or exporter; -in { - name = "prometheus-${exporter}-exporter"; + in + { + name = "prometheus-${exporter}-exporter"; - nodes.${nodeName} = mkMerge [{ - services.prometheus.exporters.${exporter} = testConfig.exporterConfig; - } testConfig.metricProvider or {}]; + nodes.${nodeName} = mkMerge [{ + services.prometheus.exporters.${exporter} = testConfig.exporterConfig; + } testConfig.metricProvider or { }]; - testScript = '' - ${nodeName}.start() - ${concatStringsSep "\n" (map (line: - if (builtins.substring 0 1 line == " " || builtins.substring 0 1 line == ")") - then line - else "${nodeName}.${line}" - ) (splitString "\n" (removeSuffix "\n" testConfig.exporterTest)))} - ${nodeName}.shutdown() - ''; + testScript = '' + ${nodeName}.start() + ${concatStringsSep "\n" (map (line: + if (builtins.substring 0 1 line == " " || builtins.substring 0 1 line == ")") + then line + else "${nodeName}.${line}" + ) (splitString "\n" (removeSuffix "\n" testConfig.exporterTest)))} + ${nodeName}.shutdown() + ''; - meta = with maintainers; { - maintainers = [ willibutz elseym ]; - }; -}))) exporterTests + meta = with maintainers; { + maintainers = [ willibutz elseym ]; + }; + } + ))) + exporterTests From 085a70f717d34d011e38b9425012e1f1d7b2f765 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Thu, 29 Apr 2021 10:03:28 +0530 Subject: [PATCH 13/30] xplr: 0.5.7 -> 0.5.10 --- pkgs/applications/misc/xplr/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/xplr/default.nix b/pkgs/applications/misc/xplr/default.nix index 46dfe713de1..14a50dbeb9e 100644 --- a/pkgs/applications/misc/xplr/default.nix +++ b/pkgs/applications/misc/xplr/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { name = "xplr"; - version = "0.5.7"; + version = "0.5.10"; src = fetchFromGitHub { owner = "sayanarijit"; repo = name; rev = "v${version}"; - sha256 = "1j417g0isy3cpxdb2wrvrvypnx99qffi83s4a98791wyi8yqiw6b"; + sha256 = "1gy0iv39arq2ri57iqsycp1sfnn1yafnhblr7p1my2wnmqwmd4qw"; }; - cargoSha256 = "0kpwhk2f4czhilcnfqkw5hw2vxvldxqg491xkkgxjkph3w4qv3ji"; + cargoSha256 = "01b4dlbakkdn3pfyyphabzrmqyp7fjy6n1nfk38z3zap5zvx8ipl"; meta = with lib; { description = "A hackable, minimal, fast TUI file explorer"; From cc6e48c8ba2e7c9f0491de4acb7d43d7a3364738 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 29 Apr 2021 08:24:35 +0200 Subject: [PATCH 14/30] =?UTF-8?q?coqPackages.coqeal:=201.0.4=20=E2=86=92?= =?UTF-8?q?=201.0.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/coq-modules/coqeal/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/coq-modules/coqeal/default.nix b/pkgs/development/coq-modules/coqeal/default.nix index 4c978a791db..615c200c633 100644 --- a/pkgs/development/coq-modules/coqeal/default.nix +++ b/pkgs/development/coq-modules/coqeal/default.nix @@ -7,10 +7,12 @@ with lib; mkCoqDerivation { owner = "CoqEAL"; inherit version; defaultVersion = with versions; switch [ coq.version mathcomp.version ] [ + { cases = [ (isGe "8.10") (range "1.11.0" "1.12.0") ]; out = "1.0.5"; } { cases = [ (isGe "8.7") "1.11.0" ]; out = "1.0.4"; } { cases = [ (isGe "8.7") "1.10.0" ]; out = "1.0.3"; } ] null; + release."1.0.5".sha256 = "0cmvky8glb5z2dy3q62aln6qbav4lrf2q1589f6h1gn5bgjrbzkm"; release."1.0.4".sha256 = "1g5m26lr2lwxh6ld2gykailhay4d0ayql4bfh0aiwqpmmczmxipk"; release."1.0.3".sha256 = "0hc63ny7phzbihy8l7wxjvn3haxx8jfnhi91iw8hkq8n29i23v24"; From d51942f9ecd336b4ab8f2a23e6e4fe686bb6516e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:01:55 +0200 Subject: [PATCH 15/30] python3Packages.zha-quirks: 0.0.56 -> 0.0.57 --- pkgs/development/python-modules/zha-quirks/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/zha-quirks/default.nix b/pkgs/development/python-modules/zha-quirks/default.nix index d9c42910e64..34335c65e1a 100644 --- a/pkgs/development/python-modules/zha-quirks/default.nix +++ b/pkgs/development/python-modules/zha-quirks/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "zha-quirks"; - version = "0.0.56"; + version = "0.0.57"; src = fetchFromGitHub { owner = "zigpy"; repo = "zha-device-handlers"; rev = version; - sha256 = "1jss5pnxdjlp0kplqxgr09vv1zq9n7l9w08hsywy2vglqmd67a66"; + sha256 = "sha256-ajdluj6UIzjJUK30GtoM+e5lsMQRKnn3FPNEg+RS/DM="; }; propagatedBuildInputs = [ From 1a3b58e760a234e448ff9696f388da231ad4dc29 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:07:10 +0200 Subject: [PATCH 16/30] python3Packages.hatasmota: 0.2.10 -> 0.2.11 --- pkgs/development/python-modules/hatasmota/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hatasmota/default.nix b/pkgs/development/python-modules/hatasmota/default.nix index 9506dbb96de..f75891c2600 100644 --- a/pkgs/development/python-modules/hatasmota/default.nix +++ b/pkgs/development/python-modules/hatasmota/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "hatasmota"; - version = "0.2.10"; + version = "0.2.11"; src = fetchFromGitHub { owner = "emontnemery"; repo = pname; rev = version; - sha256 = "sha256-f831DKQJII1/MeF1buFihi65y3l7Vp7reVEcyzbAw3o="; + sha256 = "sha256-S2pVxYpB8NcZIbhC+gnGrJxM6tvoPS1Uh87HTYiksWI="; }; propagatedBuildInputs = [ From 77485293df3fdbb5a44d7a560adbefdc377dccda Mon Sep 17 00:00:00 2001 From: Sandro Date: Thu, 29 Apr 2021 09:09:37 +0200 Subject: [PATCH 17/30] pythonPackages.xlsx2csv: fix homepage --- pkgs/development/python-modules/xlsx2csv/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xlsx2csv/default.nix b/pkgs/development/python-modules/xlsx2csv/default.nix index 6f7726da68d..47576e6ee60 100644 --- a/pkgs/development/python-modules/xlsx2csv/default.nix +++ b/pkgs/development/python-modules/xlsx2csv/default.nix @@ -13,10 +13,9 @@ buildPythonPackage rec { }; meta = with lib; { - homepage = "https://github.com/bitprophet/alabaster"; + homepage = "https://github.com/dilshod/xlsx2csv"; description = "Convert xlsx to csv"; license = licenses.bsd3; maintainers = with maintainers; [ jb55 ]; }; - } From f6cc83eb75ac437aa7ad9c90e869edbac1de95ce Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:10:25 +0200 Subject: [PATCH 18/30] python3Packages.yalexs: 1.1.10 -> 1.1.11 --- pkgs/development/python-modules/yalexs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/yalexs/default.nix b/pkgs/development/python-modules/yalexs/default.nix index c65c88b88d5..e20536b30eb 100644 --- a/pkgs/development/python-modules/yalexs/default.nix +++ b/pkgs/development/python-modules/yalexs/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "yalexs"; - version = "1.1.10"; + version = "1.1.11"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "bdraco"; repo = pname; rev = "v${version}"; - sha256 = "1qmxiafqmh51i3l30pajaqj5h0kziq4d37fn6hl58429bb85dpp9"; + sha256 = "sha256-fVUYrzIcW4jbxdhS/Bh8eu+aJPFOqj0LXjoQKw+FZdg="; }; propagatedBuildInputs = [ From 7b7dacca890330d1d4194c08d8f0536312be579b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:12:46 +0200 Subject: [PATCH 19/30] python3Packages.screenlogicpy: 0.3.0 -> 0.4.1 --- pkgs/development/python-modules/screenlogicpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/screenlogicpy/default.nix b/pkgs/development/python-modules/screenlogicpy/default.nix index 100c487acee..be9cbc6f13e 100644 --- a/pkgs/development/python-modules/screenlogicpy/default.nix +++ b/pkgs/development/python-modules/screenlogicpy/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "screenlogicpy"; - version = "0.3.0"; + version = "0.4.1"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "0gn2mf2n2g1ffdbijrydgb7dgd60lkvckblx6s86kxlkrp1wqgrq"; + sha256 = "sha256-Hj+AS8YN7ZtmgY5sUj4TmQspzeiKiLz6dBbmjhGCgXI="; }; # Project doesn't publish tests From 4ec3123b82d7c4e96ec7f55cdfa27e74be87f108 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:19:38 +0200 Subject: [PATCH 20/30] python3Packages.screenlogicpy: enable tests --- .../python-modules/screenlogicpy/default.nix | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/screenlogicpy/default.nix b/pkgs/development/python-modules/screenlogicpy/default.nix index be9cbc6f13e..1713e4c2521 100644 --- a/pkgs/development/python-modules/screenlogicpy/default.nix +++ b/pkgs/development/python-modules/screenlogicpy/default.nix @@ -1,7 +1,8 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pythonOlder +, pytestCheckHook }: buildPythonPackage rec { @@ -9,14 +10,23 @@ buildPythonPackage rec { version = "0.4.1"; disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-Hj+AS8YN7ZtmgY5sUj4TmQspzeiKiLz6dBbmjhGCgXI="; + src = fetchFromGitHub { + owner = "dieselrabbit"; + repo = pname; + rev = "v${version}"; + sha256 = "1rmjxqqbkfcv2xz8ilml799bzffls678fvq784fab2xdv595fndd"; }; - # Project doesn't publish tests - # https://github.com/dieselrabbit/screenlogicpy/issues/8 - doCheck = false; + checkInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # Tests require network access + "test_gateway_discovery" + "test_asyncio_gateway_discovery" + ]; + pythonImportsCheck = [ "screenlogicpy" ]; meta = with lib; { From a2ee0a2d27f64e19739d5855e34183ae4aaff5ec Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:40:29 +0200 Subject: [PATCH 21/30] python3Packages.pydeconz: 78 -> 79 --- pkgs/development/python-modules/pydeconz/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pydeconz/default.nix b/pkgs/development/python-modules/pydeconz/default.nix index 73d989468c5..c202e5df19b 100644 --- a/pkgs/development/python-modules/pydeconz/default.nix +++ b/pkgs/development/python-modules/pydeconz/default.nix @@ -3,21 +3,21 @@ , aioresponses , buildPythonPackage , fetchFromGitHub -, pytest-asyncio +, pytest-aiohttp , pytestCheckHook , pythonOlder }: buildPythonPackage rec { pname = "pydeconz"; - version = "78"; + version = "79"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Kane610"; repo = "deconz"; rev = "v${version}"; - sha256 = "sha256-uIRuLNGFX7gq59/ntfks9pECiGkX7jjKh2jmjxFRcv4="; + sha256 = "sha256-I29UIyHjsIymZxcE084hQoyaEMTXIIQPFcB8lsxY+UI="; }; propagatedBuildInputs = [ @@ -26,7 +26,7 @@ buildPythonPackage rec { checkInputs = [ aioresponses - pytest-asyncio + pytest-aiohttp pytestCheckHook ]; From 0e0c0a904deee3c93455f81f639484ec2eb9a4f9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:48:01 +0200 Subject: [PATCH 22/30] python3Packages.pysmappee: 0.2.23 -> 0.2.24 --- pkgs/development/python-modules/pysmappee/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysmappee/default.nix b/pkgs/development/python-modules/pysmappee/default.nix index a3517ea87ec..c845f1bf5f0 100644 --- a/pkgs/development/python-modules/pysmappee/default.nix +++ b/pkgs/development/python-modules/pysmappee/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "pysmappee"; - version = "0.2.23"; + version = "0.2.24"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "smappee"; repo = pname; rev = version; - sha256 = "sha256-vxCZzkngYnc+hD3gT1x7qAQTFjpmmgRU5F6cusNDNgk="; + sha256 = "sha256-M1qzwGf8q4WgkEL0nK1yjn3JSBbP7mr75IV45Oa+ypM="; }; propagatedBuildInputs = [ From c809b48b2f6cdfadf02a327aaacd9afb8452c2e2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:54:32 +0200 Subject: [PATCH 23/30] python3Packages.aiorecollect: 1.0.3 -> 1.0.4 --- .../python-modules/aiorecollect/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/aiorecollect/default.nix b/pkgs/development/python-modules/aiorecollect/default.nix index 53daf1f2269..1bce60ce6af 100644 --- a/pkgs/development/python-modules/aiorecollect/default.nix +++ b/pkgs/development/python-modules/aiorecollect/default.nix @@ -1,7 +1,6 @@ { lib , aiohttp , aresponses -, async-timeout , buildPythonPackage , fetchFromGitHub , freezegun @@ -13,19 +12,23 @@ buildPythonPackage rec { pname = "aiorecollect"; - version = "1.0.3"; + version = "1.0.4"; format = "pyproject"; src = fetchFromGitHub { owner = "bachya"; repo = pname; rev = version; - sha256 = "sha256-S4HL8vJS/dTKsR5egKRSHqZYPClcET5Le06euHPyIkU="; + sha256 = "sha256-A4qk7eo4maCRP4UmtWrRCPvG6YrLVSOiOcfN8pEj5Po="; }; - nativeBuildInputs = [ poetry-core ]; + nativeBuildInputs = [ + poetry-core + ]; - propagatedBuildInputs = [ aiohttp ]; + propagatedBuildInputs = [ + aiohttp + ]; checkInputs = [ aresponses @@ -35,8 +38,8 @@ buildPythonPackage rec { pytestCheckHook ]; - # Ignore the examples as they are prefixed with test_ - pytestFlagsArray = [ "--ignore examples/" ]; + disabledTestPaths = [ "examples/" ]; + pythonImportsCheck = [ "aiorecollect" ]; meta = with lib; { From 315d14d8199f0d03ecc100f0306407a673955b66 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:58:08 +0200 Subject: [PATCH 24/30] python3Packages.pyairvisual: 5.0.7 -> 5.0.8 --- pkgs/development/python-modules/pyairvisual/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pyairvisual/default.nix b/pkgs/development/python-modules/pyairvisual/default.nix index bcbb672f5c8..65f70efb7c5 100644 --- a/pkgs/development/python-modules/pyairvisual/default.nix +++ b/pkgs/development/python-modules/pyairvisual/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "pyairvisual"; - version = "5.0.7"; + version = "5.0.8"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "bachya"; repo = pname; rev = version; - sha256 = "sha256-r/AJl36dv6+C92tc3kpX4/VzG69qdh4ERCyQxDOHdVU="; + sha256 = "sha256-QgMc0O5jk5LgKQg9ZMCZd3dNLv1typm1Rp2u8kSsqYk="; }; nativeBuildInputs = [ poetry-core ]; @@ -43,8 +43,8 @@ buildPythonPackage rec { pytestCheckHook ]; - # Ignore the examples as they are prefixed with test_ - pytestFlagsArray = [ "--ignore examples/" ]; + disabledTestPaths = [ "examples/" ]; + pythonImportsCheck = [ "pyairvisual" ]; meta = with lib; { From b3d2e6c7ea8de3c6dbad216935e2f1d1634e4461 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 10:04:48 +0200 Subject: [PATCH 25/30] python3Packages.pysma: 0.4.1 -> 0.4.3 --- pkgs/development/python-modules/pysma/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysma/default.nix b/pkgs/development/python-modules/pysma/default.nix index 39941242f1d..55b6b727845 100644 --- a/pkgs/development/python-modules/pysma/default.nix +++ b/pkgs/development/python-modules/pysma/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "pysma"; - version = "0.4.1"; + version = "0.4.3"; src = fetchPypi { inherit pname version; - sha256 = "da4bed38aba52fa097694bda15c7fd80ca698d9352e71a63bc29092d635de54d"; + sha256 = "sha256-vriMnJFS7yfTyDT1f4sx1xEBTQjqc4ZHmkdHp1vcd+Q="; }; propagatedBuildInputs = [ From a670f92186204bd1b4df11244c7b01c90ec00f11 Mon Sep 17 00:00:00 2001 From: Taeer Bar-Yam Date: Thu, 29 Apr 2021 04:09:34 -0400 Subject: [PATCH 26/30] get_iplayer: 3.24 -> 3.27 (#120863) --- pkgs/applications/misc/get_iplayer/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/get_iplayer/default.nix b/pkgs/applications/misc/get_iplayer/default.nix index d4f50451719..f2692243db6 100644 --- a/pkgs/applications/misc/get_iplayer/default.nix +++ b/pkgs/applications/misc/get_iplayer/default.nix @@ -1,16 +1,16 @@ -{ lib, fetchFromGitHub, atomicparsley, flvstreamer, ffmpeg_3, makeWrapper, perl, perlPackages, rtmpdump}: +{ lib, fetchFromGitHub, atomicparsley, flvstreamer, ffmpeg, makeWrapper, perl, perlPackages, rtmpdump}: with lib; perlPackages.buildPerlPackage rec { pname = "get_iplayer"; - version = "3.24"; + version = "3.27"; src = fetchFromGitHub { owner = "get-iplayer"; repo = "get_iplayer"; rev = "v${version}"; - sha256 = "0yd84ncb6cjrk4v4kz3zrddkl7iwkm3zlfbjyswd9hanp8fvd4q3"; + sha256 = "077y31gg020wjpx5pcivqgkqawcjxh5kjnvq97x2gd7i3wwc30qi"; }; nativeBuildInputs = [ makeWrapper ]; @@ -26,7 +26,7 @@ perlPackages.buildPerlPackage rec { installPhase = '' mkdir -p $out/bin $out/share/man/man1 cp get_iplayer $out/bin - wrapProgram $out/bin/get_iplayer --suffix PATH : ${makeBinPath [ atomicparsley ffmpeg_3 flvstreamer rtmpdump ]} --prefix PERL5LIB : $PERL5LIB + wrapProgram $out/bin/get_iplayer --suffix PATH : ${makeBinPath [ atomicparsley ffmpeg flvstreamer rtmpdump ]} --prefix PERL5LIB : $PERL5LIB cp get_iplayer.1 $out/share/man/man1 ''; From 1d801e6338454089d84a0307600c0a0554bf1feb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 10:10:08 +0200 Subject: [PATCH 27/30] python3Packages.python-smarttub: 0.0.23 -> 0.0.24 --- pkgs/development/python-modules/python-smarttub/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-smarttub/default.nix b/pkgs/development/python-modules/python-smarttub/default.nix index d9d1d446d1e..380b1738964 100644 --- a/pkgs/development/python-modules/python-smarttub/default.nix +++ b/pkgs/development/python-modules/python-smarttub/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "python-smarttub"; - version = "0.0.23"; + version = "0.0.24"; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "mdz"; repo = pname; rev = "v${version}"; - sha256 = "0maqbmk50xjhv9f0zm62ayzyf99kic3c0g5714cqkw3pfp8k75cx"; + sha256 = "sha256-XWZbfPNZ1cPsDwtJRuOwIPTHmNBMzFSYHDDcbBrXjtk="; }; propagatedBuildInputs = [ From e337e136dde11304353327082d23374c253750d3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 29 Apr 2021 02:50:56 +0000 Subject: [PATCH 28/30] wf-config: 0.7.0 -> 0.7.1; enable tests --- .../window-managers/wayfire/wf-config.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/window-managers/wayfire/wf-config.nix b/pkgs/applications/window-managers/wayfire/wf-config.nix index b8e4c6aa770..d1e653cc9e0 100644 --- a/pkgs/applications/window-managers/wayfire/wf-config.nix +++ b/pkgs/applications/window-managers/wayfire/wf-config.nix @@ -1,18 +1,25 @@ -{ stdenv, lib, fetchurl, meson, ninja, pkg-config, glm, libevdev, libxml2 }: +{ stdenv, lib, fetchurl, cmake, meson, ninja, pkg-config +, doctest, glm, libevdev, libxml2 +}: stdenv.mkDerivation rec { pname = "wf-config"; - version = "0.7.0"; + version = "0.7.1"; src = fetchurl { url = "https://github.com/WayfireWM/wf-config/releases/download/v${version}/wf-config-${version}.tar.xz"; - sha256 = "1bas5gsbnf8jxkkxd95992chz8yk5ckgg7r09gfnmm7xi8w0pyy7"; + sha256 = "1w75yxhz0nvw4mlv38sxp8k8wb5h99b51x3fdvizc3yaxanqa8kx"; }; - nativeBuildInputs = [ meson ninja pkg-config ]; - buildInputs = [ libevdev libxml2 ]; + nativeBuildInputs = [ cmake meson ninja pkg-config ]; + buildInputs = [ doctest libevdev libxml2 ]; propagatedBuildInputs = [ glm ]; + # CMake is just used for finding doctest. + dontUseCmakeConfigure = true; + + doCheck = true; + meta = with lib; { homepage = "https://github.com/WayfireWM/wf-config"; description = "Library for managing configuration files, written for Wayfire"; From 6fb54f49c511f9cea7395cb118ad433dc4163625 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 29 Apr 2021 02:53:30 +0000 Subject: [PATCH 29/30] wayfire: 0.7.0 -> 0.7.1 --- pkgs/applications/window-managers/wayfire/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/window-managers/wayfire/default.nix b/pkgs/applications/window-managers/wayfire/default.nix index 303ffc35fc7..42b376a97f8 100644 --- a/pkgs/applications/window-managers/wayfire/default.nix +++ b/pkgs/applications/window-managers/wayfire/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "wayfire"; - version = "0.7.0"; + version = "0.7.1"; src = fetchurl { url = "https://github.com/WayfireWM/wayfire/releases/download/v${version}/wayfire-${version}.tar.xz"; - sha256 = "19k9nk5whql03ik66i06r4xgxk5v7mpdphjpv13hdw8ba48w73hd"; + sha256 = "0wgvwbmdhn7gkdr2jl9jndgvl6w4x7ys8gmpj55gqh9b57wqhyaq"; }; nativeBuildInputs = [ meson ninja pkg-config wayland ]; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://wayfire.org/"; - description = "3D wayland compositor"; + description = "3D Wayland compositor"; license = licenses.mit; maintainers = with maintainers; [ qyliss wucke13 ]; platforms = platforms.unix; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ed47ecd4c42..2da323ce708 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26765,8 +26765,7 @@ in wayfireApplications = wayfireApplications-unwrapped.withPlugins (plugins: [ plugins.wf-shell ]); inherit (wayfireApplications) wayfire wcm; wayfireApplications-unwrapped = recurseIntoAttrs ( - (callPackage ../applications/window-managers/wayfire/applications.nix { }). - extend (_: _: { wlroots = wlroots_0_12; }) + callPackage ../applications/window-managers/wayfire/applications.nix { } ); wayfirePlugins = recurseIntoAttrs ( callPackage ../applications/window-managers/wayfire/plugins.nix { From 2bd34a98af6bcb759030a9fba3a2565c65fe6725 Mon Sep 17 00:00:00 2001 From: Sameer Hoosen Date: Thu, 29 Apr 2021 12:57:49 +0200 Subject: [PATCH 30/30] tdesktop: 2.7.1 -> 2.7.4 (#120994) --- .../telegram/tdesktop/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index 4d6e22bd89c..372c00196a2 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -2,7 +2,7 @@ , pkg-config, cmake, ninja, python3, wrapGAppsHook, wrapQtAppsHook, removeReferencesTo , qtbase, qtimageformats, gtk3, libsForQt5, enchant2, lz4, xxHash , dee, ffmpeg, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3 -, tl-expected, hunspell, glibmm +, tl-expected, hunspell, glibmm, webkitgtk # Transitive dependencies: , pcre, xorg, util-linux, libselinux, libsepol, epoxy , at-spi2-core, libXtst, libthai, libdatrie @@ -20,19 +20,19 @@ with lib; let tg_owt = callPackage ./tg_owt.nix {}; - tgcalls-gcc10-fix = fetchpatch { # "Fix build on GCC 10, second attempt." - url = "https://github.com/TelegramMessenger/tgcalls/commit/eded7cc540123eaf26361958b9a61c65cb2f7cfc.patch"; - sha256 = "19n1hvn44pp01zc90g93vq2bcr2gdnscaj5il9f82klgh4llvjli"; + webviewPatch = fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-community/013eff77a13b6c2629a04e07a4d09dbe60c8ca48/trunk/fix-webview-includes.patch"; + sha256 = "0112zaysf3f02dd4bgqc5hwg66h1bfj8r4yjzb06sfi0pl9vl96l"; }; in mkDerivation rec { pname = "telegram-desktop"; - version = "2.7.1"; + version = "2.7.4"; # Telegram-Desktop with submodules src = fetchurl { url = "https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz"; - sha256 = "01fxzcfz3xankmdar55ja55pb9hkvlf1plgpgjpsda9xwqgbxgs1"; + sha256 = "1cigqvxa8lp79y7sp2w2izmmikxaxzrq9bh5ns3cy16z985nyllp"; }; postPatch = '' @@ -40,7 +40,7 @@ in mkDerivation rec { --replace '"libenchant-2.so.2"' '"${enchant2}/lib/libenchant-2.so.2"' substituteInPlace Telegram/CMakeLists.txt \ --replace '"''${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml"' '"''${TDESKTOP_LAUNCHER_BASENAME}.metainfo.xml"' - patch -d Telegram/ThirdParty/tgcalls/ -p1 < "${tgcalls-gcc10-fix}" + patch -d Telegram/lib_webview -p1 < "${webviewPatch}" ''; # We want to run wrapProgram manually (with additional parameters) @@ -52,7 +52,7 @@ in mkDerivation rec { buildInputs = [ qtbase qtimageformats gtk3 libsForQt5.kwayland libsForQt5.libdbusmenu enchant2 lz4 xxHash dee ffmpeg openalSoft minizip libopus alsaLib libpulseaudio range-v3 - tl-expected hunspell glibmm + tl-expected hunspell glibmm webkitgtk tg_owt # Transitive dependencies: pcre xorg.libpthreadstubs xorg.libXdmcp util-linux libselinux libsepol epoxy