git.iko.soy/typeable/nixpkgs
on master help sign in
zabbix.agent2: minor cleanup
commit32c2087987ac9d4f13d80780d97ee6038ffacdc9 authorAaron Andersen <aaron@fosslib.net> dateMon 29 Mar 2021, 17:27 (6 years ago) parent63dc779
1 file changed+5−11
pkgs/servers/monitoring/zabbix/agent2.nix+5−11
pkgs/servers/monitoring/zabbix/agent2.nix+5−11
@@ -10,9 +10,11 @@ import ./versions.nix ({ version, sha256 }:
1010 inherit sha256;
1111 };
1212
13+ modRoot = "src/go";
14+
1315 vendorSha256 = "1ral3xg58x0lf5vl839nlabf443yzqnbrlzm0q127mvv412f5ajc";
1416
15− nativeBuildInputs = [ autoreconfHook pkg-config];
17+ nativeBuildInputs = [ autoreconfHook pkg-config ];
1618 buildInputs = [ libiconv openssl pcre zlib ];
1719
1820 inherit (buildGoModule.go) GOOS GOARCH;
@@ -37,10 +39,9 @@ import ./versions.nix ({ version, sha256 }:
3739 '';
3840
3941 # zabbix build process is complex to get right in nix...
40− # we need to manipulate a number of things for their build
41− # system to properly work
42+ # use automake to build the go project ensuring proper access to the go vendor directory
4243 buildPhase = ''
43− cp -r vendor src/go/vendor
44+ cd ../..
4445 make
4546 '';
4647
@@ -49,13 +50,6 @@ import ./versions.nix ({ version, sha256 }:
4950 install -Dm0755 src/go/bin/zabbix_agent2 $out/bin/zabbix_agent2
5051 '';
5152
52− # run `go mod vendor` from the correct directory
53− overrideModAttrs = (_oldAttrs : {
54− preConfigure = ''
55− cd src/go
56− '';
57− });
58−
5953 meta = with lib; {
6054 description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
6155 homepage = "https://www.zabbix.com/";