From 66d0c4b1bd2e947a95aa2795fb4a933429470219 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 20 Mar 2017 22:54:59 +0100 Subject: [PATCH] heartbeat: 5.2.1 -> 5.2.2, build from source --- pkgs/misc/logging/heartbeat/default.nix | 31 +++++++++++-------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/pkgs/misc/logging/heartbeat/default.nix b/pkgs/misc/logging/heartbeat/default.nix index 905fbf5fb757..faa558589f25 100644 --- a/pkgs/misc/logging/heartbeat/default.nix +++ b/pkgs/misc/logging/heartbeat/default.nix @@ -1,28 +1,25 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchFromGitHub, buildGoPackage }: -stdenv.mkDerivation rec { +buildGoPackage rec { name = "heartbeat-${version}"; - version = "5.2.1"; + version = "5.2.2"; - src = fetchurl { - url = "https://artifacts.elastic.co/downloads/beats/heartbeat/${name}-linux-x86_64.tar.gz"; - sha256 = "1sq3va0kbpqsjbd0bnziv2hwnp6nc2vk32hc9drjk7bhcxkp440l"; + 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"; - installPhase = '' - mkdir -p $out/bin - cp heartbeat $out/bin/ - ''; + subPackages = [ "heartbeat" ]; - meta = { + meta = with stdenv.lib; { description = "Lightweight shipper for uptime monitoring"; 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; }; }