Skip to content

Commit

Permalink
metricbeat: 5.2.1 -> 5.2.2, build from source
Browse files Browse the repository at this point in the history
  • Loading branch information
globin committed Mar 20, 2017
1 parent 66d0c4b commit 4d08d1a
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions pkgs/misc/logging/metricbeat/default.nix
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
{ stdenv, fetchurl }:
{ stdenv, fetchFromGitHub, buildGoPackage }:

stdenv.mkDerivation rec {
buildGoPackage rec {
name = "metricbeat-${version}";
version = "5.2.1";
version = "5.2.2";

src = fetchurl {
url = "https://artifacts.elastic.co/downloads/beats/metricbeat/${name}-linux-x86_64.tar.gz";
sha256 = "0shpyqgrqiiqv9anipqms1xy0wn5n2m11fvicdzr3x1v3jygm1ds";
src = fetchFromGitHub {
owner = "elastic";
repo = "beats";
rev = "v${version}";
sha256 = "19hkq19xpi3c9y5g1yq77sm2d5vzybn6mxxf0s5l6sw4l98aak5q";
};

# statically linked binary, no need to build anything
dontBuild = true;
doCheck = false;
goPackagePath = "github.com/elastic/beats";

# need to patch interpreter to be able to run on NixOS
patchPhase = ''
patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) metricbeat
'';
subPackages = [ "metricbeat" ];

installPhase = ''
mkdir -p $out/bin
cp metricbeat $out/bin/
'';

meta = {
meta = with stdenv.lib; {
description = "Lightweight shipper for metrics";
homepage = https://www.elastic.co/products/beats;
license = stdenv.lib.licenses.asl20;
maintainers = [ stdenv.lib.maintainers.fadenb ];
platforms = [ "x86_64-linux" ];
license = licenses.asl20;
maintainers = [ maintainers.fadenb ];
platforms = platforms.linux;
};
}

0 comments on commit 4d08d1a

Please sign in to comment.