2021-05-18 14:11:45 +03:00
|
|
|
{ stdenv, rustPlatform, fetchFromGitHub, lib, libiconv, Security, nixosTests }:
|
2019-06-02 04:13:53 +03:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wireguard-exporter";
|
2022-03-14 12:47:50 +03:00
|
|
|
version = "3.6.2";
|
2019-06-02 04:13:53 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MindFlavor";
|
|
|
|
repo = "prometheus_wireguard_exporter";
|
|
|
|
rev = version;
|
2022-03-14 12:47:50 +03:00
|
|
|
sha256 = "sha256-eVGyBynKZLGlsaLwUOx7cJWdRHl65S0Wk1K5c9T8ysQ=";
|
2019-06-02 04:13:53 +03:00
|
|
|
};
|
|
|
|
|
2022-03-14 12:47:50 +03:00
|
|
|
cargoSha256 = "sha256-JbFoaMTs6TPYq2qgBkT7WX1itMXohgcWbC1UvaXOi8o=";
|
2019-06-02 04:13:53 +03:00
|
|
|
|
2021-05-18 14:11:45 +03:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
2019-06-02 04:13:53 +03:00
|
|
|
|
2020-06-18 13:48:40 +03:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) wireguard; };
|
|
|
|
|
2019-06-02 04:13:53 +03:00
|
|
|
meta = with lib; {
|
2020-10-11 08:55:05 +03:00
|
|
|
description = "A Prometheus exporter for WireGuard, written in Rust";
|
2020-03-07 17:47:19 +03:00
|
|
|
homepage = "https://github.com/MindFlavor/prometheus_wireguard_exporter";
|
2019-06-02 04:13:53 +03:00
|
|
|
license = licenses.mit;
|
2019-08-20 20:36:05 +03:00
|
|
|
maintainers = with maintainers; [ ma27 globin ];
|
2019-06-02 04:13:53 +03:00
|
|
|
};
|
|
|
|
}
|