From 4d93f6e3a3bd6ea02b6dc4a075b49e6b3c39b6df Mon Sep 17 00:00:00 2001 From: Vanilla Date: Sun, 1 Oct 2023 09:33:02 +0800 Subject: [PATCH] wireguard-exporter: fix static build --- pkgs/servers/monitoring/prometheus/wireguard-exporter.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix b/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix index 14920ea035ff..d810633c17f3 100644 --- a/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix @@ -13,6 +13,11 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-NsxGpjuZPpz4gCJRp5IOcfRFh8DTud47nV2bE0/kc2Q="; + postPatch = '' + # drop hardcoded linker names, fixing static build + rm .cargo/config.toml + ''; + buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; passthru.tests = { inherit (nixosTests.prometheus-exporters) wireguard; };