diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/zs-apc-spdu-ctl/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/networking/zs-apc-spdu-ctl/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/networking/zs-apc-spdu-ctl/default.nix b/nixpkgs/pkgs/tools/networking/zs-apc-spdu-ctl/default.nix new file mode 100644 index 000000000000..1a3d3ed7a355 --- /dev/null +++ b/nixpkgs/pkgs/tools/networking/zs-apc-spdu-ctl/default.nix @@ -0,0 +1,36 @@ +{ cmake +, fetchFromGitHub +, fping +, lib +, libowlevelzs +, net-snmp +, stdenv +}: + +# TODO: add a services entry for the /etc/zs-apc-spdu.conf file +stdenv.mkDerivation rec { + pname = "zs-apc-spdu-ctl"; + version = "0.0.2"; + + src = fetchFromGitHub { + owner = "zseri"; + repo = "zs-apc-spdu-ctl"; + rev = "v${version}"; + sha256 = "TMV9ETWBVeXq6tZ2e0CrvHBXoyKfOLCQurjBdf/iw/M="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libowlevelzs net-snmp ]; + + postPatch = '' + substituteInPlace src/confent.cxx \ + --replace /usr/sbin/fping "${fping}/bin/fping" + ''; + + meta = with lib; { + description = "APC SPDU control utility"; + license = licenses.mit; + maintainers = with maintainers; [ zseri ]; + platforms = platforms.linux; + }; +} |