10 pname = "nezha-agent";
13 src = fetchFromGitHub {
16 rev = "refs/tags/v${version}";
17 hash = "sha256-CVE1c0LLheGlH8oMWQWs6fox7mlHc5Y2O9XQ6kqXAwI=";
20 vendorHash = "sha256-ytFsTHl6kVwmqCabaMDxxijszY3jzWWUIZKBCebPMkI=";
25 "-X main.version=${version}"
26 "-X main.arch=${stdenv.hostPlatform.system}"
31 # Skip tests that require network access
36 "TestCloudflareDetection"
39 [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
46 ln -sr nezha-agent agent
50 doInstallCheck = true;
52 versionCheckProgramArg = "-v";
54 nativeInstallCheckInputs = [
59 updateScript = nix-update-script { };
63 description = "Agent of Nezha Monitoring";
64 homepage = "https://github.com/nezhahq/agent";
65 license = lib.licenses.asl20;
66 maintainers = with lib.maintainers; [ moraxyc ];
67 mainProgram = "nezha-agent";