1 { lib, fetchFromGitHub, fetchpatch, elk6Version, buildGoPackage, libpcap, nixosTests, systemd }:
3 let beat = package : extraArgs : buildGoPackage (rec {
4 name = "${package}-${version}";
7 src = fetchFromGitHub {
11 sha256 = "1vnw9clsc10cfpjf6vxvc6m507b2q17sgsl079iwqbp4v0286il7";
14 goPackagePath = "github.com/elastic/beats";
16 subPackages = [ package ];
20 # Build fix for aarch64, possibly other systems, merged in beats 7.x https://github.com/elastic/beats/pull/9493
21 url = "https://github.com/elastic/beats/commit/5d796571de1aa2a299393d2045dacc2efac41a04.diff";
22 sha256 = "sha256:0b79fljbi5xd3h8iiv1m38ad0zhmj09f187asc0m9rxlqrz2l9r2";
27 homepage = "https://www.elastic.co/products/beats";
28 license = licenses.asl20;
29 maintainers = with maintainers; [ fadenb basvandijk dfithian ];
30 platforms = platforms.linux;
34 filebeat6 = beat "filebeat" {meta.description = "Lightweight shipper for logfiles";};
35 heartbeat6 = beat "heartbeat" {meta.description = "Lightweight shipper for uptime monitoring";};
36 metricbeat6 = beat "metricbeat" {
37 meta.description = "Lightweight shipper for metrics";
39 assert metricbeat6.drvPath == nixosTests.elk.ELK-6.elkPackages.metricbeat.drvPath;
41 elk = nixosTests.elk.ELK-6;
44 journalbeat6 = beat "journalbeat" {
46 Journalbeat is an open source data collector to read and forward
47 journal entries from Linuxes with systemd.
49 buildInputs = [ systemd.dev ];
50 postFixup = let libPath = lib.makeLibraryPath [ (lib.getLib systemd) ]; in ''
51 patchelf --set-rpath ${libPath} "$out/bin/journalbeat"