Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2021-04-29 12:26:05 +00:00 committed by GitHub
commit 54e69b71cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 527 additions and 226 deletions

View File

@ -59,6 +59,7 @@ let
"surfboard"
"systemd"
"tor"
"unbound"
"unifi"
"unifi-poller"
"varnish"

View File

@ -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" ];
})
]);
}

View File

@ -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,15 @@ in {
and give commands interactively to kresd@1.service.
'';
};
package = mkOption {
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;
default = "";
@ -115,7 +122,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 +130,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";

View File

@ -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.<exporterName> = {
* exporterConfig = {
* enable = true;
* };
* metricProvider = {
* services.<metricProvider>.enable = true;
* };
* exporterTest = ''
* wait_for_unit("prometheus-<exporterName>-exporter.service")
* wait_for_open_port("1234")
* succeed("curl -sSf 'localhost:1234/metrics'")
* '';
* };
*
* # this would generate the following test config:
*
* nodes.<exporterName> = {
* services.prometheus.<exporterName> = {
* enable = true;
* };
* services.<metricProvider>.enable = true;
* };
*
* testScript = ''
* <exporterName>.start()
* <exporterName>.wait_for_unit("prometheus-<exporterName>-exporter.service")
* <exporterName>.wait_for_open_port("1234")
* <exporterName>.succeed("curl -sSf 'localhost:1234/metrics'")
* <exporterName>.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.<exporterName> = {
* exporterConfig = {
* enable = true;
* };
* metricProvider = {
* services.<metricProvider>.enable = true;
* };
* exporterTest = ''
* wait_for_unit("prometheus-<exporterName>-exporter.service")
* wait_for_open_port("1234")
* succeed("curl -sSf 'localhost:1234/metrics'")
* '';
* };
*
* # this would generate the following test config:
*
* nodes.<exporterName> = {
* services.prometheus.<exporterName> = {
* enable = true;
* };
* services.<metricProvider>.enable = true;
* };
*
* testScript = ''
* <exporterName>.start()
* <exporterName>.wait_for_unit("prometheus-<exporterName>-exporter.service")
* <exporterName>.wait_for_open_port("1234")
* <exporterName>.succeed("curl -sSf 'localhost:1234/metrics'")
* <exporterName>.shutdown()
* '';
*/
exporterTests = {
apcupsd = {
apcupsd = {
exporterConfig = {
enable = true;
};
@ -192,20 +192,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 = {
@ -258,7 +259,8 @@ let
'';
};
fritzbox = { # TODO add proper test case
fritzbox = {
# TODO add proper test case
exporterConfig = {
enable = true;
};
@ -377,19 +379,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" ];
@ -411,14 +413,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 = {
@ -520,15 +522,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" = {
@ -585,7 +589,7 @@ let
syslog = {
listen_address = "udp://127.0.0.1:10000";
format = "rfc3164";
tags = ["nginx"];
tags = [ "nginx" ];
};
};
}
@ -705,10 +709,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
@ -828,19 +832,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 <<EOF > "$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 <<EOF > "$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")
@ -856,7 +862,7 @@ let
smokeping = {
exporterConfig = {
enable = true;
hosts = ["127.0.0.1"];
hosts = [ "127.0.0.1" ];
};
exporterTest = ''
wait_for_unit("prometheus-smokeping-exporter.service")
@ -994,7 +1000,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)
@ -1004,6 +1010,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;
@ -1033,54 +1062,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

View File

@ -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
'';

View File

@ -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;

View File

@ -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";

View File

@ -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",

View File

@ -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

View File

@ -39,6 +39,7 @@ stdenv.mkDerivation rec {
libsecret
nss
xorg.libxkbfile
xorg.libXdamage
xorg.libXScrnSaver
xorg.libXtst
];

View File

@ -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;

View File

@ -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";

View File

@ -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

View File

@ -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
''

View File

@ -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 <<EOF;
#!/usr/bin/env sh
${jre}/bin/java -cp $out/lib Hello
EOF
chmod a+x $out/bin/hello
runHook postInstallPhase
'';
}

View File

@ -0,0 +1,42 @@
{ jdk
, jre
, pkgs
}:
/* 'Hello world' Java application derivation for use in tests */
let
source = pkgs.writeTextDir "src/Hello.java" ''
class Hello {
public static void main(String[] args) {
System.out.println("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 <<EOF;
#!/usr/bin/env sh
${jre}/bin/java -cp $out/lib Hello
EOF
chmod a+x $out/bin/hello
runHook postInstallPhase
'';
}

View File

@ -0,0 +1,16 @@
{ runCommand
, callPackage
, jdk
, jre_minimal
}:
let
hello = callPackage ./hello.nix {
jdk = jdk;
jre = jre_minimal;
};
in
runCommand "test" {} ''
${hello}/bin/hello | grep "Hello, world!"
touch $out
''

View File

@ -0,0 +1,21 @@
{ runCommand
, callPackage
, jdk
, jre_minimal
}:
let
hello-logging = callPackage ./hello-logging.nix {
jdk = jdk;
jre = jre_minimal.override {
modules = [
"java.base"
"java.logging"
];
};
};
in
runCommand "test" {} ''
${hello-logging}/bin/hello &>/dev/stdout | grep "Hello, world!"
touch $out
''

View File

@ -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";

View File

@ -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"

View File

@ -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; {

View File

@ -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 = [

View File

@ -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; {

View File

@ -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
];

View File

@ -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 = [

View File

@ -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 = [

View File

@ -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 = [

View File

@ -1,22 +1,32 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "screenlogicpy";
version = "0.3.0";
version = "0.4.1";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "0gn2mf2n2g1ffdbijrydgb7dgd60lkvckblx6s86kxlkrp1wqgrq";
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; {

View File

@ -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 ];
};
}

View File

@ -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 = [

View File

@ -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 = [

View File

@ -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" ];

View File

@ -0,0 +1,30 @@
{ lib, rustPlatform, fetchFromGitHub, openssl, pkg-config, nixosTests }:
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 ];
passthru.tests = {
inherit (nixosTests.prometheus-exporters) unbound;
};
meta = with lib; {
description = "Prometheus exporter for Unbound DNS resolver";
homepage = "https://github.com/svartalf/unbound-telemetry";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -19200,6 +19200,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 { };
@ -26778,8 +26779,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 {