about summary refs log tree commit diff
path: root/pkgs/servers/monitoring/prometheus/json-exporter.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/monitoring/prometheus/json-exporter.nix')
-rw-r--r--pkgs/servers/monitoring/prometheus/json-exporter.nix26
1 files changed, 9 insertions, 17 deletions
diff --git a/pkgs/servers/monitoring/prometheus/json-exporter.nix b/pkgs/servers/monitoring/prometheus/json-exporter.nix
index afa610809318..796eb065e63c 100644
--- a/pkgs/servers/monitoring/prometheus/json-exporter.nix
+++ b/pkgs/servers/monitoring/prometheus/json-exporter.nix
@@ -1,31 +1,23 @@
-# This file was generated by go2nix.
-{ buildGoPackage, fetchFromGitHub, fetchpatch, lib, nixosTests }:
+{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
 
-buildGoPackage {
+buildGoModule rec {
   pname = "prometheus-json-exporter";
-  version = "unstable-2017-10-06";
-
-  goPackagePath = "github.com/kawamuray/prometheus-json-exporter";
+  version = "0.2.0";
 
   src = fetchFromGitHub {
-    owner = "kawamuray";
-    repo = "prometheus-json-exporter";
-    rev = "51e3dc02a30ab818bb73e5c98c3853231c2dbb5f";
-    sha256 = "1v1p4zcqnb3d3rm55r695ydn61h6gz95f55cpa22hzw18dasahdh";
+    owner = "prometheus-community";
+    repo = "json_exporter";
+    rev = "v${version}";
+    sha256 = "1aabvd75a2223x5wnbyryigj7grw6l05jhr3g3s97b1f1hfigz6d";
   };
 
-  goDeps = ./json-exporter_deps.nix;
-
-  patches = [(fetchpatch { # adds bool support
-    url = "https://patch-diff.githubusercontent.com/raw/kawamuray/prometheus-json-exporter/pull/17.patch";
-    sha256 = "0mc5axhd2bykci41dgswl4r1552d70jsmb17lbih7czhsy6rgmrm";
-  })];
+  vendorSha256 = "03kb0gklq08krl7qnvs7267siw1pkyy346b42dsk1d9gr5302wsw";
 
   passthru.tests = { inherit (nixosTests.prometheus-exporters) json; };
 
   meta = with lib; {
     description = "A prometheus exporter which scrapes remote JSON by JSONPath";
-    homepage = "https://github.com/kawamuray/prometheus-json-exporter";
+    homepage = "https://github.com/prometheus-community/json_exporter";
     license = licenses.asl20;
     maintainers = with maintainers; [ willibutz ];
   };