diff --git a/pkgs/servers/monitoring/prometheus/prom2json/default.nix b/pkgs/servers/monitoring/prometheus/prom2json/default.nix deleted file mode 100644 index 716f3c8bf545..000000000000 --- a/pkgs/servers/monitoring/prometheus/prom2json/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ goPackages, lib, fetchFromGitHub }: - -let self = goPackages.buildGoPackage rec { - name = "prom2json-${rev}"; - rev = "0.1.0"; - goPackagePath = "github.com/prometheus/prom2json"; - - src = fetchFromGitHub { - owner = "prometheus"; - repo = "prom2json"; - inherit rev; - sha256 = "0wwh3mz7z81fwh8n78sshvj46akcgjhxapjgfic5afc4nv926zdl"; - }; - - buildInputs = with goPackages; [ - golang_protobuf_extensions - prometheus.client_golang - protobuf - ]; - - meta = with lib; { - description = "A tool to scrape a Prometheus client and dump the result as JSON"; - homepage = https://github.com/prometheus/prom2json; - license = licenses.asl20; - maintainers = with maintainers; [ benley ]; - platforms = platforms.unix; - }; -}; - -in self.bin diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3fc6a34b3df8..14713821ba13 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9196,8 +9196,7 @@ let postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { }; - prom2json = callPackage ../servers/monitoring/prometheus/prom2json { }; - + prom2json = goPackages.prometheus.prom2json.bin; prometheus = goPackages.prometheus.prometheus.bin; prometheus-alertmanager = goPackages.prometheus.alertmanager.bin; prometheus-cli = goPackages.prometheus.cli.bin; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 397bcccc80d3..a098da3635ca 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -2056,6 +2056,27 @@ let sha256 = "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"; }; + prometheus.prom2json = buildFromGitHub { + rev = "0.1.0"; + owner = "prometheus"; + repo = "prom2json"; + sha256 = "0wwh3mz7z81fwh8n78sshvj46akcgjhxapjgfic5afc4nv926zdl"; + + buildInputs = [ + golang_protobuf_extensions + prometheus.client_golang + protobuf + ]; + + meta = with stdenv.lib; { + description = "Tool to scrape a Prometheus client and dump the result as JSON"; + homepage = https://github.com/prometheus/prom2json; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; + }; + prometheus.prometheus = buildGoPackage rec { name = "prometheus-${version}"; version = "0.15.1";