Merge pull request #31215 from BlessJah/mtail

Mtail

authored by Orivej Desh and committed by GitHub dd443ad2 0ce1067b

+100 -3
+3 -3
pkgs/development/tools/gotools/default.nix
··· 2 3 buildGoPackage rec { 4 name = "gotools-${version}"; 5 - version = "20160519-${stdenv.lib.strings.substring 0 7 rev}"; 6 - rev = "9ae4729fba20b3533d829a9c6ba8195b068f2abc"; 7 8 goPackagePath = "golang.org/x/tools"; 9 goPackageAliases = [ "code.google.com/p/go.tools" ]; ··· 11 src = fetchgit { 12 inherit rev; 13 url = "https://go.googlesource.com/tools"; 14 - sha256 = "1j51aaskfqc953p5s9naqimr04hzfijm4yczdsiway1xnnvvpfr1"; 15 }; 16 17 goDeps = ./deps.nix;
··· 2 3 buildGoPackage rec { 4 name = "gotools-${version}"; 5 + version = "20170807-${stdenv.lib.strings.substring 0 7 rev}"; 6 + rev = "5d2fd3ccab986d52112bf301d47a819783339d0e"; 7 8 goPackagePath = "golang.org/x/tools"; 9 goPackageAliases = [ "code.google.com/p/go.tools" ]; ··· 11 src = fetchgit { 12 inherit rev; 13 url = "https://go.googlesource.com/tools"; 14 + sha256 = "0r3fp7na6pg0bc5xfycjvv951f0vma1qfnpw5zy6l75yxm5r47kn"; 15 }; 16 17 goDeps = ./deps.nix;
+26
pkgs/servers/monitoring/mtail/default.nix
···
··· 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 + }
+56
pkgs/servers/monitoring/mtail/deps.nix
···
··· 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 + ]
+13
pkgs/servers/monitoring/mtail/fix-gopath.patch
···
··· 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 +
+2
pkgs/top-level/all-packages.nix
··· 2971 2972 mkcast = callPackage ../applications/video/mkcast { }; 2973 2974 multitail = callPackage ../tools/misc/multitail { }; 2975 2976 mxt-app = callPackage ../misc/mxt-app { };
··· 2971 2972 mkcast = callPackage ../applications/video/mkcast { }; 2973 2974 + mtail = callPackage ../servers/monitoring/mtail { }; 2975 + 2976 multitail = callPackage ../tools/misc/multitail { }; 2977 2978 mxt-app = callPackage ../misc/mxt-app { };