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