git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #31215 from BlessJah/mtail

Mtail

commitdd443ad220c29a3941945ec036760909670f3c11 authorOrivej Desh <orivej@gmx.fr> dateSat 4 Nov 2017, 01:02 (9 years ago) parent0ce1067c3e7e22
5 files changed+100−3
pkgs/development/tools/gotools/default.nix+3−3 pkgs/servers/monitoring/mtail/default.nix+26 pkgs/servers/monitoring/mtail/deps.nix+56 pkgs/servers/monitoring/mtail/fix-gopath.patch+13 pkgs/top-level/all-packages.nix+2
pkgs/development/tools/gotools/default.nix+3−3
@@ -2,8 +2,8 @@
22
33buildGoPackage rec {
44 name = "gotools-${version}";
5− version = "20160519-${stdenv.lib.strings.substring 0 7 rev}";
6− rev = "9ae4729fba20b3533d829a9c6ba8195b068f2abc";
5+ version = "20170807-${stdenv.lib.strings.substring 0 7 rev}";
6+ rev = "5d2fd3ccab986d52112bf301d47a819783339d0e";
77
88 goPackagePath = "golang.org/x/tools";
99 goPackageAliases = [ "code.google.com/p/go.tools" ];
@@ -11,7 +11,7 @@ buildGoPackage rec {
1111 src = fetchgit {
1212 inherit rev;
1313 url = "https://go.googlesource.com/tools";
14− sha256 = "1j51aaskfqc953p5s9naqimr04hzfijm4yczdsiway1xnnvvpfr1";
14+ sha256 = "0r3fp7na6pg0bc5xfycjvv951f0vma1qfnpw5zy6l75yxm5r47kn";
1515 };
1616
1717 goDeps = ./deps.nix;
pkgs/servers/monitoring/mtail/default.nixnew file+26
@@ -0,0 +1,26 @@
1+{ lib, fetchFromGitHub, gotools, buildGoPackage }:
2+
3+buildGoPackage rec {
4+ name = "mtail-${version}";
5+ version = "3.0.0-rc4";
6+ goPackagePath = "github.com/google/mtail";
7+
8+ src = fetchFromGitHub {
9+ owner = "google";
10+ repo = "mtail";
11+ rev = "v${version}";
12+ sha256 = "1n7pqvid48ayn15qfpgpbsx0iqg24x08wphzpc08mlfw47gq7jg3";
13+ };
14+
15+ buildInputs = [ gotools ];
16+ goDeps = ./deps.nix;
17+ patches = [ ./fix-gopath.patch ];
18+ preBuild = "go generate -x ./go/src/github.com/google/mtail/vm/";
19+
20+
21+ meta = with lib; {
22+ license = licenses.asl20;
23+ homepage = "https://github.com/google/mtail";
24+ description = "Tool for extracting metrics from application logs";
25+ };
26+}
pkgs/servers/monitoring/mtail/deps.nixnew file+56
@@ -0,0 +1,56 @@
1+[
2+ rec {
3+ goPackagePath = "github.com/golang/glog";
4+ fetch = {
5+ type = "git";
6+ url = "https://${goPackagePath}.git";
7+ rev = "23def4e6c14b4da8ac2ed8007337bc5eb5007998";
8+ sha256 = "0jb2834rw5sykfr937fxi8hxi2zy80sj2bdn9b3jb4b26ksqng30";
9+ };
10+ }
11+ rec {
12+ goPackagePath = "github.com/spf13/afero";
13+ fetch = {
14+ type = "git";
15+ url = "https://${goPackagePath}.git";
16+ rev = "5660eeed305fe5f69c8fc6cf899132a459a97064";
17+ sha256 = "0rpwvjp9xfmy2yvbmy810qamjhimr56zydvx7hb1gjn3b7jp4rhd";
18+ };
19+ }
20+ rec {
21+ goPackagePath = "github.com/fsnotify/fsnotify";
22+ fetch = {
23+ type = "git";
24+ url = "https://${goPackagePath}.git";
25+ rev = "v1.4.2";
26+ sha256 = "06wfg1mmzjj04z7d0q1x2fai9k6hm957brngsaf02fa9a3qqanv3";
27+ };
28+ }
29+ rec {
30+ goPackagePath = "github.com/pkg/errors";
31+ fetch = {
32+ type = "git";
33+ url = "https://${goPackagePath}.git";
34+ rev = "v0.8.0";
35+ sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
36+ };
37+ }
38+ {
39+ goPackagePath = "golang.org/x/sys";
40+ fetch = {
41+ type = "git";
42+ url = "https://go.googlesource.com/sys";
43+ rev = "95c6576299259db960f6c5b9b69ea52422860fce";
44+ sha256 = "1fhq8bianb9a1iccpr92mi2hix9zvm10n0f7syx6vfbxdw32i316";
45+ };
46+ }
47+ {
48+ goPackagePath = "golang.org/x/text";
49+ fetch = {
50+ type = "git";
51+ url = "https://go.googlesource.com/text";
52+ rev = "3ba1a4dc141f5236b19ccbf2f67cb63d1a688d46";
53+ sha256 = "07sbakmman41p5hmdbf4y2wak0gh7k1z88m0zb72acsypp4179h1";
54+ };
55+ }
56+]
pkgs/servers/monitoring/mtail/fix-gopath.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/vm/compiler.go b/vm/compiler.go
2+index c55266b..a46417c 100644
3+--- a/vm/compiler.go
4++++ b/vm/compiler.go
5+@@ -2,7 +2,7 @@
6+ // This file is available under the Apache license.
7+
8+ // Build the parser:
9+-//go:generate $GOPATH/bin/goyacc -v y.output -o parser.go -p mtail parser.y
10++//go:generate goyacc -v y.output -o parser.go -p mtail parser.y
11+
12+ package vm
13+
pkgs/top-level/all-packages.nix+2
@@ -2971,6 +2971,8 @@ with pkgs;
29712971
29722972 mkcast = callPackage ../applications/video/mkcast { };
29732973
2974+ mtail = callPackage ../servers/monitoring/mtail { };
2975+
29742976 multitail = callPackage ../tools/misc/multitail { };
29752977
29762978 mxt-app = callPackage ../misc/mxt-app { };