nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 fetchFromGitHub,
3 lib,
4 nix-update-script,
5 openbsd_snmp3_check,
6 python3Packages,
7 testers,
8}:
9python3Packages.buildPythonApplication rec {
10 pname = "openbsd_snmp3_check";
11 version = "0.55";
12 pyproject = false;
13
14 src = fetchFromGitHub {
15 owner = "alexander-naumov";
16 repo = "openbsd_snmp3_check";
17 rev = "v${version}";
18 hash = "sha256-qDYANMvQU72f9wz8os7S1PfBH08AAqhtWLHVuSmkub4=";
19 };
20
21 postInstall = ''
22 install -Dm755 openbsd_snmp3.py $out/bin/openbsd_snmp3.py
23 '';
24
25 passthru = {
26 updateScript = nix-update-script { };
27 tests.version = testers.testVersion {
28 package = openbsd_snmp3_check;
29 };
30 };
31
32 meta = {
33 changelog = "https://github.com/alexander-naumov/openbsd_snmp3_check/releases/tag/v${version}";
34 description = "SNMP v3 check for OpenBSD systems state monitoring";
35 homepage = "https://github.com/alexander-naumov/openbsd_snmp3_check";
36 license = with lib.licenses; [ bsd3 ];
37 platforms = lib.platforms.unix;
38 maintainers = with lib.maintainers; [ jwillikers ];
39 mainProgram = "openbsd_snmp3.py";
40 };
41}