diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix new file mode 100644 index 000000000000..c7c8f3e5963a --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, rustPlatform, fetchFromGitHub, openssl, pkg-config, nixosTests, Security }: + +rustPlatform.buildRustPackage rec { + pname = "unbound-telemetry"; + version = "unstable-2021-03-17"; + + src = fetchFromGitHub { + owner = "svartalf"; + repo = pname; + rev = "7f1b6d4e9e4b6a3216a78c23df745bcf8fc84021"; + sha256 = "xCelL6WGaTRhDJkkUdpdwj1zcKKAU2dyUv3mHeI4oAw="; + }; + + cargoSha256 = "sha256-P3nAtYOuwNSLMP7q1L5zKTsZ6rJA/qL1mhVHzP3szi4="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl ] + ++ lib.optional stdenv.isDarwin Security; + + 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 ]; + }; +} |