summary refs log tree commit diff
path: root/pkgs/tools/networking/snmpcheck/default.nix
blob: e27ead59e9716316cea3b8c7af671ef4e3659bd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, lib, fetchurl, ruby }:

let
  rubyEnv = ruby.withPackages (ps: [ ps.snmp ]);
in
stdenv.mkDerivation rec {
  pname = "snmpcheck";
  version = "1.9";
  src = fetchurl {
    url = "http://www.nothink.org/codes/snmpcheck/snmpcheck-${version}.rb";
    sha256 = "sha256-9xkLqbgxU1uykx+M9QsbPAH8OI/Cqn9uw6ALe23Lbq0=";
    executable = true;
  };

  dontUnpack = true;

  buildInputs = [ rubyEnv.wrappedRuby ];

  installPhase = ''
    mkdir -p $out/bin
    cp $src $out/bin/snmp-check
  '';

  meta = with lib; {
    description = "SNMP enumerator";
    homepage = "http://www.nothink.org/codes/snmpcheck/";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ elohmeier ];
  };
}