diff --git a/pkgs/applications/misc/nut/default.nix b/pkgs/applications/misc/nut/default.nix index a574520a5af6..b2ed55eb16ca 100644 --- a/pkgs/applications/misc/nut/default.nix +++ b/pkgs/applications/misc/nut/default.nix @@ -23,11 +23,11 @@ stdenv.mkDerivation rec { pname = "nut"; - version = "2.8.0"; + version = "2.8.2"; src = fetchurl { url = "https://networkupstools.org/source/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz"; - sha256 = "sha256-w+WnCNp5e3xwtlPTexIGoAD8tQO4VRn+TN9jU/eSv+U="; + sha256 = "sha256-5LSwy+fdObqQl75/fXh7sv/74132Tf9Ttf45PWWcWX0="; }; patches = [ @@ -56,6 +56,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-all" "--with-ssl" + "--without-gpio" "--without-powerman" # Until we have it ... "--with-systemdsystemunitdir=$(out)/lib/systemd/system" "--with-systemdshutdowndir=$(out)/lib/systemd/system-shutdown" @@ -83,9 +84,6 @@ stdenv.mkDerivation rec { substituteInPlace $out/lib/systemd/system/nut-driver-enumerator.path \ --replace "$out/etc/ups.conf" "/etc/nut/ups.conf" - # we don't need init.d scripts - rm -r $out/share/solaris-init - # Suspicious/overly broad rule, remove it until we know better rm $out/etc/udev/rules.d/52-nut-ipmipsu.rules ''; diff --git a/pkgs/applications/misc/nut/hardcode-paths.patch b/pkgs/applications/misc/nut/hardcode-paths.patch index a58d402a2058..b2d0a55fb56a 100644 --- a/pkgs/applications/misc/nut/hardcode-paths.patch +++ b/pkgs/applications/misc/nut/hardcode-paths.patch @@ -1,9 +1,9 @@ --- a/common/common.c +++ b/common/common.c -@@ -991,6 +991,12 @@ ssize_t select_write(const int fd, const void *buf, const size_t buflen, const t +@@ -1990,6 +1990,12 @@ ssize_t select_write(serial_handler_t *fd, const void *buf, const size_t buflen, * communications media and/or vendor protocol. */ - static const char * search_paths[] = { + static const char * search_paths_builtin[] = { + "@avahi@", + "@freeipmi@", + "@libusb@", @@ -12,4 +12,4 @@ + "@netsnmp@", /* Use the library path (and bitness) provided during ./configure first */ LIBDIR, - "/usr"LIBDIR, + "/usr"LIBDIR, /* Note: this can lead to bogus strings like */