diff options
author | Dominik Honnef <dominik@honnef.co> | 2023-05-20 15:42:49 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2023-07-09 23:00:04 +0200 |
commit | eef5476659f1a4990e892122fcd9aa4e6157328f (patch) | |
tree | f97596dde8177d3aef7ec632649dae05c3ed0c51 /pkgs/applications/misc/nut | |
parent | 552efeba59d5e7b75046161a91679d273eda1e8a (diff) |
nut: add support for SNMP and CGI
Diffstat (limited to 'pkgs/applications/misc/nut')
-rw-r--r-- | pkgs/applications/misc/nut/default.nix | 7 | ||||
-rw-r--r-- | pkgs/applications/misc/nut/hardcode-paths.patch | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/applications/misc/nut/default.nix b/pkgs/applications/misc/nut/default.nix index 0afe4bf18c1e9..4243dd50b87cb 100644 --- a/pkgs/applications/misc/nut/default.nix +++ b/pkgs/applications/misc/nut/default.nix @@ -5,12 +5,14 @@ , coreutils , fetchurl , freeipmi +, gd , i2c-tools , libmodbus , libtool , libusb-compat-0_1 , makeWrapper , neon +, net-snmp , openssl , pkg-config , substituteAll @@ -35,19 +37,18 @@ stdenv.mkDerivation rec { libusb = "${libusb-compat-0_1}/lib"; neon = "${neon}/lib"; libmodbus = "${libmodbus}/lib"; + netsnmp = "${net-snmp.lib}/lib"; }) ]; - buildInputs = [ neon libusb-compat-0_1 openssl udev avahi freeipmi libmodbus i2c-tools ]; + buildInputs = [ neon libusb-compat-0_1 openssl udev avahi freeipmi libmodbus i2c-tools net-snmp gd ]; nativeBuildInputs = [ autoreconfHook libtool pkg-config makeWrapper ]; configureFlags = [ "--with-all" "--with-ssl" - "--without-snmp" # Until we have it ... "--without-powerman" # Until we have it ... - "--without-cgi" "--with-systemdsystemunitdir=$(out)/lib/systemd/system" "--with-systemdshutdowndir=$(out)/lib/systemd/system-shutdown" "--with-systemdtmpfilesdir=$(out)/lib/tmpfiles.d" diff --git a/pkgs/applications/misc/nut/hardcode-paths.patch b/pkgs/applications/misc/nut/hardcode-paths.patch index 5116fb438e533..a58d402a20589 100644 --- a/pkgs/applications/misc/nut/hardcode-paths.patch +++ b/pkgs/applications/misc/nut/hardcode-paths.patch @@ -1,6 +1,6 @@ --- a/common/common.c +++ b/common/common.c -@@ -991,6 +991,11 @@ ssize_t select_write(const int fd, const void *buf, const size_t buflen, const t +@@ -991,6 +991,12 @@ ssize_t select_write(const int fd, const void *buf, const size_t buflen, const t * communications media and/or vendor protocol. */ static const char * search_paths[] = { @@ -9,6 +9,7 @@ + "@libusb@", + "@neon@", + "@libmodbus@", ++ "@netsnmp@", /* Use the library path (and bitness) provided during ./configure first */ LIBDIR, "/usr"LIBDIR, |