nixpkgs/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix

24 lines
730 B
Nix

{ stdenv, rustPlatform, fetchFromGitHub, lib, Security }:
rustPlatform.buildRustPackage rec {
pname = "wireguard-exporter";
version = "3.2.4";
src = fetchFromGitHub {
owner = "MindFlavor";
repo = "prometheus_wireguard_exporter";
rev = version;
sha256 = "15his6mv3vmzfg972fb8m01h2m3jxmaqz3zw2krfr136mvg2rvjw";
};
cargoSha256 = "0ajkpshjv0im6falgjrsc2jdbvm2rhibl4v8rcmb2fg3kx7xc8vf";
buildInputs = lib.optional stdenv.isDarwin Security;
meta = with lib; {
description = "A Prometheus exporter for WireGuard, written in Rust.";
homepage = "https://github.com/MindFlavor/prometheus_wireguard_exporter";
license = licenses.mit;
maintainers = with maintainers; [ ma27 globin ];
};
}