nixpkgs/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix
Benjamin Hipple eb11feaa0b treewide: change fetchCargoTarball default to opt-out
Changes the default fetcher in the Rust Platform to be the newer
`fetchCargoTarball`, and changes every application using the current default to
instead opt out.

This commit does not change any hashes or cause any rebuilds. Once integrated,
we will start deleting the opt-outs and recomputing hashes.

See #79975 for details.
2020-02-13 22:41:37 -08:00

33 lines
1.2 KiB
Nix

{ stdenv, rustPlatform, fetchFromGitHub, lib, Security }:
rustPlatform.buildRustPackage rec {
pname = "wireguard-exporter";
version = "3.2.2";
src = fetchFromGitHub {
owner = "MindFlavor";
repo = "prometheus_wireguard_exporter";
rev = version;
sha256 = "18khym7ygj29w98zf6i1l5c2pz84zla2z34l5jnh595xvwfl94pc";
};
# Delete this on next update; see #79975 for details
legacyCargoFetcher = true;
cargoSha256 = "1bi9nr1dhyv322pq6fjrhs12h3wdak53mvwkbyim1hmrp62vky4m";
buildInputs = lib.optional stdenv.isDarwin Security;
# Commonly used hack in nixpkgs to allow unstable features on a stable rustc. This is needed
# since `prometheus_exporter_base` uses `#!feature[]` to enable async which
# is actually not needed as `async` is part of rustc 1.39.0-stable. This can be removed
# as soon as https://github.com/MindFlavor/prometheus_exporter_base/pull/15 is merged.
RUSTC_BOOTSTRAP = 1;
meta = with lib; {
description = "A Prometheus exporter for WireGuard, written in Rust.";
license = licenses.mit;
homepage = https://github.com/MindFlavor/prometheus_wireguard_exporter;
maintainers = with maintainers; [ ma27 globin ];
};
}