mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-19 03:29:17 +03:00
nezha-agent: init at 0.16.3
This commit is contained in:
parent
a31b5f20ac
commit
482ffcfacd
45
pkgs/by-name/ne/nezha-agent/package.nix
Normal file
45
pkgs/by-name/ne/nezha-agent/package.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildGoModule,
|
||||||
|
fetchFromGitHub,
|
||||||
|
nezha-agent,
|
||||||
|
testers,
|
||||||
|
}:
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "nezha-agent";
|
||||||
|
version = "0.16.3";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "nezhahq";
|
||||||
|
repo = "agent";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-DeZzR25KWxA70nS0mICaOb0TeBhnurm3FWLNS/EjwZA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = "sha256-b8jICFsQaSetBzhTiq8zBX/LYuhQNly5kj45ZV6NDiY=";
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X main.version=${version}"
|
||||||
|
];
|
||||||
|
|
||||||
|
# The test failed due to a geoip request in the sandbox. Remove it to avoid network requirement
|
||||||
|
preCheck = ''
|
||||||
|
rm ./pkg/monitor/myip_test.go
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
version = testers.testVersion {
|
||||||
|
package = nezha-agent;
|
||||||
|
command = "${nezha-agent}/bin/agent -v";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Agent of Nezha Monitoring";
|
||||||
|
homepage = "https://github.com/nezhahq/agent";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [moraxyc];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user