diff --git a/pkgs/development/go-modules/libs.json b/pkgs/development/go-modules/libs.json index e571d246c8e3..42a52185a1ff 100644 --- a/pkgs/development/go-modules/libs.json +++ b/pkgs/development/go-modules/libs.json @@ -1249,5 +1249,14 @@ "rev": "6aacfd5ab513e34f7e64ea9627ab9670371b34e7", "sha256": "00rrjysmq898qcrf2hfwfh9s70vwvmjx2kp5w03nz1krxa4zhrkl" } + }, + { + "goPackagePath": "github.com/howeyc/fsnotify", + "fetch": { + "type": "git", + "url": "https://github.com/fsnotify/fsnotify", + "rev": "ea925a0a47d225b2ca7f9932b01d2ed4f3ec74f6", + "sha256": "15wqjpkfzsxnaxbz6y4r91hw6812g3sc4ipagxw1bya9klbnkdc9" + } } ] diff --git a/pkgs/servers/monitoring/prometheus/statsd-bridge.nix b/pkgs/servers/monitoring/prometheus/statsd-bridge.nix new file mode 100644 index 000000000000..4458b668a197 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/statsd-bridge.nix @@ -0,0 +1,28 @@ +# This file was generated by go2nix. +{ stdenv, lib, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }: + +with goPackages; + +buildGoPackage rec { + name = "statsd_bridge-${version}"; + version = "0.1.0"; + rev = version; + + goPackagePath = "github.com/prometheus/statsd_bridge"; + + src = fetchgit { + inherit rev; + url = "https://github.com/prometheus/statsd_bridge"; + sha256 = "1fndpmd1k0a3ar6f7zpisijzc60f2dng5399nld1i1cbmd8jybjr"; + }; + + goDeps = ./statsd-bridge_deps.json; + + meta = with stdenv.lib; { + description = "Receives StatsD-style metrics and exports them to Prometheus"; + homepage = https://github.com/prometheus/statsd_bridge; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.json b/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.json new file mode 100644 index 000000000000..cda65257317d --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.json @@ -0,0 +1,15 @@ +[ + { + "include": "../../libs.json", + "packages": [ + "github.com/howeyc/fsnotify", + "github.com/prometheus/client_golang", + "github.com/prometheus/client_model", + "bitbucket.org/ww/goautoneg", + "github.com/beorn7/perks", + "github.com/golang/protobuf", + "github.com/matttproud/golang_protobuf_extensions", + "github.com/prometheus/procfs" + ] + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75f454f3a8b1..891472ae4c90 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10188,7 +10188,7 @@ in prometheus-nginx-exporter = callPackage ../servers/monitoring/prometheus/nginx-exporter.nix { }; prometheus-node-exporter = callPackage ../servers/monitoring/prometheus/node-exporter.nix { }; prometheus-pushgateway = callPackage ../servers/monitoring/prometheus/pushgateway.nix { }; - prometheus-statsd-bridge = goPackages.prometheus.statsd-bridge.bin // { outputs = [ "bin" ]; }; + prometheus-statsd-bridge = callPackage ../servers/monitoring/prometheus/statsd-bridge.nix { }; psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { }; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index b5b4563cd035..3602c68d908f 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -2595,21 +2595,6 @@ let sha256 = "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"; }; - prometheus.statsd-bridge = buildFromGitHub { - rev = "0.1.0"; - owner = "prometheus"; - repo = "statsd_bridge"; - sha256 = "1fndpmd1k0a3ar6f7zpisijzc60f2dng5399nld1i1cbmd8jybjr"; - buildInputs = [ fsnotify.v0 prometheus.client_golang ]; - meta = with stdenv.lib; { - description = "Receives StatsD-style metrics and exports them to Prometheus"; - homepage = https://github.com/prometheus/statsd_bridge; - license = licenses.asl20; - maintainers = with maintainers; [ benley ]; - platforms = platforms.unix; - }; - }; - properties = buildFromGitHub { rev = "v1.5.6"; owner = "magiconair";