From 7eb35cd1447a7c076bd4869c0e2e5f1ee428d70d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 21 Mar 2020 06:28:00 -0500 Subject: [PATCH] prometheus-mikrotik-exporter: fix build on darwin --- pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix | 4 +++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix b/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix index 12341eee911e..96526d246a6d 100644 --- a/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "mikrotik-exporter-unstable"; @@ -13,6 +13,8 @@ buildGoModule rec { modSha256 = "1cqjn6j3dfq51ssjx0qrajprlac1h0lb1r4af44lfpigzmrfyi07"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + meta = with stdenv.lib; { inherit (src.meta) homepage; description = "Prometheus MikroTik device(s) exporter"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5dc2d9c15c22..6b5e26533474 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16022,7 +16022,9 @@ in prometheus-json-exporter = callPackage ../servers/monitoring/prometheus/json-exporter.nix { }; prometheus-mail-exporter = callPackage ../servers/monitoring/prometheus/mail-exporter.nix { }; prometheus-mesos-exporter = callPackage ../servers/monitoring/prometheus/mesos-exporter.nix { }; - prometheus-mikrotik-exporter = callPackage ../servers/monitoring/prometheus/mikrotik-exporter.nix { }; + prometheus-mikrotik-exporter = callPackage ../servers/monitoring/prometheus/mikrotik-exporter.nix { + inherit (darwin.apple_sdk.frameworks) Security; + }; prometheus-minio-exporter = callPackage ../servers/monitoring/prometheus/minio-exporter { }; prometheus-mysqld-exporter = callPackage ../servers/monitoring/prometheus/mysqld-exporter.nix { }; prometheus-nextcloud-exporter = callPackage ../servers/monitoring/prometheus/nextcloud-exporter.nix { };