Merge pull request #8122 from benley/prometheus-0.14

Prometheus: update to 0.14.0
This commit is contained in:
lethalman 2015-06-03 11:09:44 +02:00
commit 6e0ca8cd11
2 changed files with 65 additions and 55 deletions

View File

@ -1,58 +1,55 @@
{ stdenv, lib, goPackages, fetchFromGitHub, protobuf, vim }: { stdenv, lib, goPackages, fetchFromGitHub, vim }:
goPackages.buildGoPackage rec { goPackages.buildGoPackage rec {
name = "prometheus-${version}"; name = "prometheus-${version}";
version = "0.13.4"; version = "0.14.0";
goPackagePath = "github.com/prometheus/prometheus"; goPackagePath = "github.com/prometheus/prometheus";
rev = "612da96c46f0b7ea6cc28a3fc614f14eae0189d0"; rev = "67e77411ba30b1b0ce0989c85b6684fb3adef430";
src = fetchFromGitHub { src = fetchFromGitHub {
inherit rev; inherit rev;
owner = "prometheus"; owner = "prometheus";
repo = "prometheus"; repo = "prometheus";
sha256 = "1r3pcnxs1cdh18lmqd60r3nh614cw543wzd4slkr2nzr73pn5x4j"; sha256 = "06xsxigimw5i1fla0k83pf5bpmybskvy50433hs8h876gyvgjxp9";
}; };
buildInputs = [ buildInputs = [
goPackages.dns goPackages.consul
goPackages.glog goPackages.dns
goPackages.protobuf goPackages.fsnotify.v1
goPackages.goleveldb goPackages.goleveldb
goPackages.net goPackages.logrus
goPackages.prometheus.client_golang goPackages.net
protobuf # the non-golang package, for protoc goPackages.prometheus.client_golang
vim # for xxd, used in embed-static.sh goPackages.prometheus.log
]; goPackages.yaml-v2
vim # for xxd, used in embed-static.sh
];
# Metadata that gets embedded into the binary # Metadata that gets embedded into the binary
buildFlagsArray = '' buildFlagsArray = ''
-ldflags= -ldflags=
-X main.buildVersion ${version} -X main.buildVersion ${version}
-X main.buildRevision ${builtins.substring 0 6 rev} -X main.buildRevision ${builtins.substring 0 6 rev}
-X main.buildBranch master -X main.buildBranch master
-X main.buildUser nix@nixpkgs -X main.buildUser nix@nixpkgs
-X main.buildDate 20150101-00:00:00 -X main.buildDate 20150101-00:00:00
-X main.goVersion ${lib.getVersion goPackages.go} -X main.goVersion ${lib.getVersion goPackages.go}
''; '';
preBuild = '' preBuild = ''
( (
cd "go/src/$goPackagePath" cd "go/src/$goPackagePath/web"
protoc --proto_path=./config \ ${stdenv.shell} ../utility/embed-static.sh static templates \
--go_out=./config/generated/ \ | gofmt > blob/files.go
./config/config.proto )
'';
cd web meta = with lib; {
${stdenv.shell} ../utility/embed-static.sh static templates \ description = "Service monitoring system and time series database";
| gofmt > blob/files.go homepage = http://prometheus.io;
) license = licenses.asl20;
''; maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
meta = with lib; { };
description = "Service monitoring system and time series database";
homepage = http://prometheus.github.io;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
} }

View File

@ -2426,16 +2426,29 @@ let
}; };
yaml-v1 = buildGoPackage rec { yaml-v1 = buildGoPackage rec {
rev = "b0c168ac0cf9493da1f9bb76c34b26ffef940b4a"; name = "yaml-v1-${version}";
name = "yaml-v1-${stdenv.lib.strings.substring 0 7 rev}"; version = "git-2015-05-01";
goPackagePath = "gopkg.in/yaml.v1"; goPackagePath = "gopkg.in/yaml.v1";
src = fetchgit { src = fetchFromGitHub {
inherit rev; rev = "b0c168ac0cf9493da1f9bb76c34b26ffef940b4a";
url = "https://github.com/go-yaml/yaml.git"; owner = "go-yaml";
repo = "yaml";
sha256 = "0jbdy41pplf2d1j24qwr8gc5qsig6ai5ch8rwgvg72kq9q0901cy"; sha256 = "0jbdy41pplf2d1j24qwr8gc5qsig6ai5ch8rwgvg72kq9q0901cy";
}; };
}; };
yaml-v2 = buildGoPackage rec {
name = "yaml-v2-${version}";
version = "git-2015-05-19";
goPackagePath = "gopkg.in/yaml.v2";
src = fetchFromGitHub {
rev = "c1cd2254a6dd314c9d73c338c12688c9325d85c6";
owner = "go-yaml";
repo = "yaml";
sha256 = "0xhv0i700hh8lczrwxhn3c99npqma7k4337qrh6k36falm0jpp4s";
};
};
yamux = buildGoPackage rec { yamux = buildGoPackage rec {
rev = "b2e55852ddaf823a85c67f798080eb7d08acd71d"; rev = "b2e55852ddaf823a85c67f798080eb7d08acd71d";
name = "yamux-${stdenv.lib.strings.substring 0 7 rev}"; name = "yamux-${stdenv.lib.strings.substring 0 7 rev}";