zabbix.agent2: minor cleanup

This commit is contained in:
Aaron Andersen 2021-03-29 17:27:03 -04:00 committed by tomberek
parent 63dc77958d
commit 32c2087987

View File

@ -10,9 +10,11 @@ import ./versions.nix ({ version, sha256 }:
inherit sha256;
};
modRoot = "src/go";
vendorSha256 = "1ral3xg58x0lf5vl839nlabf443yzqnbrlzm0q127mvv412f5ajc";
nativeBuildInputs = [ autoreconfHook pkg-config];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ libiconv openssl pcre zlib ];
inherit (buildGoModule.go) GOOS GOARCH;
@ -37,10 +39,9 @@ import ./versions.nix ({ version, sha256 }:
'';
# zabbix build process is complex to get right in nix...
# we need to manipulate a number of things for their build
# system to properly work
# use automake to build the go project ensuring proper access to the go vendor directory
buildPhase = ''
cp -r vendor src/go/vendor
cd ../..
make
'';
@ -49,13 +50,6 @@ import ./versions.nix ({ version, sha256 }:
install -Dm0755 src/go/bin/zabbix_agent2 $out/bin/zabbix_agent2
'';
# run `go mod vendor` from the correct directory
overrideModAttrs = (_oldAttrs : {
preConfigure = ''
cd src/go
'';
});
meta = with lib; {
description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
homepage = "https://www.zabbix.com/";