From fdebbdb88909a7e004b0262fb9d18791e161633e Mon Sep 17 00:00:00 2001 From: Kamil Chmielewski Date: Sun, 5 Jun 2016 15:16:50 +0200 Subject: [PATCH] prometheus-haproxy-exporter: extracted from goPackages --- .../prometheus/haproxy-exporter.nix | 28 +++++++++++++++++++ .../prometheus/haproxy-exporter_deps.json | 14 ++++++++++ pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/go-packages.nix | 15 ---------- 4 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 pkgs/servers/monitoring/prometheus/haproxy-exporter.nix create mode 100644 pkgs/servers/monitoring/prometheus/haproxy-exporter_deps.json diff --git a/pkgs/servers/monitoring/prometheus/haproxy-exporter.nix b/pkgs/servers/monitoring/prometheus/haproxy-exporter.nix new file mode 100644 index 000000000000..efb5abd9f9f7 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/haproxy-exporter.nix @@ -0,0 +1,28 @@ +# This file was generated by go2nix. +{ stdenv, lib, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }: + +with goPackages; + +buildGoPackage rec { + name = "haproxy_exporter-${version}"; + version = "0.4.0"; + rev = version; + + goPackagePath = "github.com/prometheus/haproxy_exporter"; + + src = fetchgit { + inherit rev; + url = "https://github.com/prometheus/haproxy_exporter"; + sha256 = "0cwls1d4hmzjkwc50mjkxjb4sa4q6yq581wlc5sg9mdvl6g91zxr"; + }; + + goDeps = ./haproxy-exporter_deps.json; + + meta = with stdenv.lib; { + description = "HAProxy Exporter for the Prometheus monitoring system"; + homepage = https://github.com/prometheus/haproxy_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/haproxy-exporter_deps.json b/pkgs/servers/monitoring/prometheus/haproxy-exporter_deps.json new file mode 100644 index 000000000000..20a46eb370cf --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/haproxy-exporter_deps.json @@ -0,0 +1,14 @@ +[ + { + "include": "../../libs.json", + "packages": [ + "github.com/prometheus/client_golang", + "github.com/prometheus/client_model", + "github.com/matttproud/golang_protobuf_extensions", + "github.com/prometheus/procfs", + "github.com/beorn7/perks", + "github.com/golang/protobuf", + "bitbucket.org/ww/goautoneg" + ] + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 41c3f33fbb53..ae05d14076e3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10182,7 +10182,7 @@ in prometheus-alertmanager = callPackage ../servers/monitoring/prometheus/alertmanager.nix { }; prometheus-cli = callPackage ../servers/monitoring/prometheus/cli.nix { }; prometheus-collectd-exporter = callPackage ../servers/monitoring/prometheus/collectd-exporter.nix { }; - prometheus-haproxy-exporter = goPackages.prometheus.haproxy-exporter.bin // { outputs = [ "bin" ]; }; + prometheus-haproxy-exporter = callPackage ../servers/monitoring/prometheus/haproxy-exporter.nix { }; prometheus-mesos-exporter = goPackages.prometheus.mesos-exporter.bin // { outputs = [ "bin" ]; }; prometheus-mysqld-exporter = goPackages.prometheus.mysqld-exporter.bin // { outputs = [ "bin" ]; }; prometheus-nginx-exporter = goPackages.prometheus.nginx-exporter.bin // { outputs = [ "bin" ]; }; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index a0f0bf0efc75..b221cc2dd04d 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -2588,21 +2588,6 @@ let buildInputs = [ protobuf ]; }; - prometheus.haproxy-exporter = buildFromGitHub { - rev = "0.4.0"; - owner = "prometheus"; - repo = "haproxy_exporter"; - sha256 = "0cwls1d4hmzjkwc50mjkxjb4sa4q6yq581wlc5sg9mdvl6g91zxr"; - buildInputs = [ prometheus.client_golang ]; - meta = with stdenv.lib; { - description = "HAProxy Exporter for the Prometheus monitoring system"; - homepage = https://github.com/prometheus/haproxy_exporter; - license = licenses.asl20; - maintainers = with maintainers; [ benley ]; - platforms = platforms.unix; - }; - }; - prometheus.log = buildFromGitHub { rev = "439e5db48fbb50ebbaf2c816030473a62f505f55"; version = "2015-05-29";