zabbix.agent2: minor cleanup
This commit is contained in:
parent
63dc77958d
commit
32c2087987
@ -10,9 +10,11 @@ import ./versions.nix ({ version, sha256 }:
|
|||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
modRoot = "src/go";
|
||||||
|
|
||||||
vendorSha256 = "1ral3xg58x0lf5vl839nlabf443yzqnbrlzm0q127mvv412f5ajc";
|
vendorSha256 = "1ral3xg58x0lf5vl839nlabf443yzqnbrlzm0q127mvv412f5ajc";
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkg-config];
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||||
buildInputs = [ libiconv openssl pcre zlib ];
|
buildInputs = [ libiconv openssl pcre zlib ];
|
||||||
|
|
||||||
inherit (buildGoModule.go) GOOS GOARCH;
|
inherit (buildGoModule.go) GOOS GOARCH;
|
||||||
@ -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/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user