forked from mirrors/nixpkgs
prometheus-pushgateway: extracted from goPackages
This commit is contained in:
parent
28b6e9863c
commit
5fec17a3e2
|
@ -1240,5 +1240,14 @@
|
|||
"rev": "0a5264e2563429030eb922f258229ae3fee5b5dc",
|
||||
"sha256": "03fvgbjf2aprjj1s6wdc35wwa7k1w5phkixzvp5n1j21sf6w4h24"
|
||||
}
|
||||
},
|
||||
{
|
||||
"goPackagePath": "github.com/julienschmidt/httprouter",
|
||||
"fetch": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/julienschmidt/httprouter",
|
||||
"rev": "6aacfd5ab513e34f7e64ea9627ab9670371b34e7",
|
||||
"sha256": "00rrjysmq898qcrf2hfwfh9s70vwvmjx2kp5w03nz1krxa4zhrkl"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
28
pkgs/development/tools/go-bindata/default.nix
Normal file
28
pkgs/development/tools/go-bindata/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
# This file was generated by go2nix.
|
||||
{ stdenv, lib, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }:
|
||||
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "go-bindata-${version}";
|
||||
version = "20151023-${stdenv.lib.strings.substring 0 7 rev}";
|
||||
rev = "a0ff2567cfb70903282db057e799fd826784d41d";
|
||||
|
||||
goPackagePath = "github.com/jteeuwen/go-bindata";
|
||||
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "https://github.com/jteeuwen/go-bindata";
|
||||
sha256 = "0d6zxv0hgh938rf59p1k5lj0ymrb8kcps2vfrb9kaarxsvg7y69v";
|
||||
};
|
||||
|
||||
excludedPackages = "testdata";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/jteeuwen/go-bindata";
|
||||
description = "A small utility which generates Go code from any file, useful for embedding binary data in a Go program";
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
license = licenses.cc0 ;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
47
pkgs/servers/monitoring/prometheus/pushgateway.nix
Normal file
47
pkgs/servers/monitoring/prometheus/pushgateway.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
# This file was generated by go2nix.
|
||||
{ stdenv, lib, goPackages, go-bindata, fetchgit, fetchhg, fetchbzr, fetchsvn }:
|
||||
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "pushgateway-${version}";
|
||||
version = "0.1.1";
|
||||
rev = version;
|
||||
|
||||
goPackagePath = "github.com/prometheus/pushgateway";
|
||||
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "https://github.com/prometheus/pushgateway";
|
||||
sha256 = "17q5z9msip46wh3vxcsq9lvvhbxg75akjjcr2b29zrky8bp2m230";
|
||||
};
|
||||
|
||||
goDeps = ./pushgateway_deps.json;
|
||||
|
||||
buildInputs = [ go-bindata ];
|
||||
|
||||
preBuild = ''
|
||||
(
|
||||
cd "go/src/$goPackagePath"
|
||||
go-bindata ./resources/
|
||||
)
|
||||
'';
|
||||
|
||||
buildFlagsArray = ''
|
||||
-ldflags=
|
||||
-X main.buildVersion=${version}
|
||||
-X main.buildRev=${rev}
|
||||
-X main.buildBranch=master
|
||||
-X main.buildUser=nix@nixpkgs
|
||||
-X main.buildDate=20150101-00:00:00
|
||||
-X main.goVersion=${stdenv.lib.getVersion go}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Allows ephemeral and batch jobs to expose metrics to Prometheus";
|
||||
homepage = https://github.com/prometheus/pushgateway;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ benley ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
15
pkgs/servers/monitoring/prometheus/pushgateway_deps.json
Normal file
15
pkgs/servers/monitoring/prometheus/pushgateway_deps.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"include": "../../libs.json",
|
||||
"packages": [
|
||||
"github.com/julienschmidt/httprouter",
|
||||
"github.com/prometheus/client_golang",
|
||||
"github.com/prometheus/client_model",
|
||||
"bitbucket.org/ww/goautoneg",
|
||||
"github.com/golang/protobuf",
|
||||
"github.com/matttproud/golang_protobuf_extensions",
|
||||
"github.com/prometheus/procfs",
|
||||
"github.com/beorn7/perks"
|
||||
]
|
||||
}
|
||||
]
|
|
@ -10187,7 +10187,7 @@ in
|
|||
prometheus-mysqld-exporter = callPackage ../servers/monitoring/prometheus/mysqld-exporter.nix { };
|
||||
prometheus-nginx-exporter = callPackage ../servers/monitoring/prometheus/nginx-exporter.nix { };
|
||||
prometheus-node-exporter = callPackage ../servers/monitoring/prometheus/node-exporter.nix { };
|
||||
prometheus-pushgateway = goPackages.prometheus.pushgateway.bin // { outputs = [ "bin" ]; };
|
||||
prometheus-pushgateway = callPackage ../servers/monitoring/prometheus/pushgateway.nix { };
|
||||
prometheus-statsd-bridge = goPackages.prometheus.statsd-bridge.bin // { outputs = [ "bin" ]; };
|
||||
|
||||
psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { };
|
||||
|
@ -11151,6 +11151,8 @@ in
|
|||
inherit (gnome) gtk gtkmm;
|
||||
};
|
||||
|
||||
go-bindata = callPackage ../development/tools/go-bindata { };
|
||||
|
||||
gocode = callPackage ../development/tools/gocode { };
|
||||
|
||||
kgocode = callPackage ../applications/misc/kgocode {
|
||||
|
|
|
@ -1264,30 +1264,6 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
go-bindata = buildGoPackage rec {
|
||||
rev = "a0ff2567cfb70903282db057e799fd826784d41d";
|
||||
date = "2015-10-23";
|
||||
version = "${date}-${stdenv.lib.strings.substring 0 7 rev}";
|
||||
name = "go-bindata-${version}";
|
||||
goPackagePath = "github.com/jteeuwen/go-bindata";
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
repo = "go-bindata";
|
||||
owner = "jteeuwen";
|
||||
sha256 = "0d6zxv0hgh938rf59p1k5lj0ymrb8kcps2vfrb9kaarxsvg7y69v";
|
||||
};
|
||||
|
||||
subPackages = [ "./" "go-bindata" ]; # don't build testdata
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/jteeuwen/go-bindata";
|
||||
description = "A small utility which generates Go code from any file, useful for embedding binary data in a Go program";
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
license = licenses.cc0 ;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
go-bindata-assetfs = buildFromGitHub {
|
||||
rev = "d5cac425555ca5cf00694df246e04f05e6a55150";
|
||||
owner = "elazarl";
|
||||
|
@ -2619,46 +2595,6 @@ let
|
|||
sha256 = "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r";
|
||||
};
|
||||
|
||||
prometheus.pushgateway = buildFromGitHub rec {
|
||||
rev = "0.1.1";
|
||||
owner = "prometheus";
|
||||
repo = "pushgateway";
|
||||
sha256 = "17q5z9msip46wh3vxcsq9lvvhbxg75akjjcr2b29zrky8bp2m230";
|
||||
|
||||
buildInputs = [
|
||||
protobuf
|
||||
httprouter
|
||||
golang_protobuf_extensions
|
||||
prometheus.client_golang
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ go-bindata.bin ];
|
||||
preBuild = ''
|
||||
(
|
||||
cd "go/src/$goPackagePath"
|
||||
go-bindata ./resources/
|
||||
)
|
||||
'';
|
||||
|
||||
buildFlagsArray = ''
|
||||
-ldflags=
|
||||
-X main.buildVersion=${rev}
|
||||
-X main.buildRev=${rev}
|
||||
-X main.buildBranch=master
|
||||
-X main.buildUser=nix@nixpkgs
|
||||
-X main.buildDate=20150101-00:00:00
|
||||
-X main.goVersion=${stdenv.lib.getVersion go}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Allows ephemeral and batch jobs to expose metrics to Prometheus";
|
||||
homepage = https://github.com/prometheus/pushgateway;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ benley ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
|
||||
prometheus.statsd-bridge = buildFromGitHub {
|
||||
rev = "0.1.0";
|
||||
owner = "prometheus";
|
||||
|
|
Loading…
Reference in a new issue