2021-05-18 12:08:23 +01:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, openssl, pkg-config, nixosTests, Security }:
|
2021-04-24 07:58:47 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "unbound-telemetry";
|
|
|
|
version = "unstable-2021-03-17";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "svartalf";
|
|
|
|
repo = pname;
|
|
|
|
rev = "7f1b6d4e9e4b6a3216a78c23df745bcf8fc84021";
|
|
|
|
sha256 = "xCelL6WGaTRhDJkkUdpdwj1zcKKAU2dyUv3mHeI4oAw=";
|
|
|
|
};
|
|
|
|
|
2021-05-07 12:00:49 +01:00
|
|
|
cargoSha256 = "sha256-P3nAtYOuwNSLMP7q1L5zKTsZ6rJA/qL1mhVHzP3szi4=";
|
2021-04-24 07:58:47 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2021-05-18 12:08:23 +01:00
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ lib.optional stdenv.isDarwin Security;
|
2021-04-24 07:58:47 +01:00
|
|
|
|
2021-04-29 05:00:45 +01:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests.prometheus-exporters) unbound;
|
|
|
|
};
|
|
|
|
|
2021-04-24 07:58:47 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Prometheus exporter for Unbound DNS resolver";
|
|
|
|
homepage = "https://github.com/svartalf/unbound-telemetry";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|