2021-05-18 11:08:23 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, openssl, pkg-config, nixosTests, Security }:
|
2021-04-24 06:58:47 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "unbound-telemetry";
|
2021-09-22 23:37:53 +00:00
|
|
|
version = "unstable-2021-09-18";
|
2021-04-24 06:58:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "svartalf";
|
|
|
|
repo = pname;
|
2021-09-22 23:37:53 +00:00
|
|
|
rev = "19e53b05828a43b7062b67a9cc6c84836ca26439";
|
|
|
|
sha256 = "sha256-wkr9T6GlJP/PSv17z3MC7vC0cXg/Z6rGlhlCUHH3Ua4=";
|
2021-04-24 06:58:47 +00:00
|
|
|
};
|
|
|
|
|
2021-09-22 23:37:53 +00:00
|
|
|
cargoSha256 = "sha256-6V39Wfqin2RK73rehsIwmqDkOin4FEiqJQjTKAEx9Vs=";
|
2021-04-24 06:58:47 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2021-05-18 11:08:23 +00:00
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ lib.optional stdenv.isDarwin Security;
|
2021-04-24 06:58:47 +00:00
|
|
|
|
2021-04-29 04:00:45 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests.prometheus-exporters) unbound;
|
|
|
|
};
|
|
|
|
|
2021-04-24 06:58:47 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|