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