From d43eae54d3e1b64e67dcd4806962cd4a7e6c33c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Tue, 13 Aug 2024 12:21:00 +0200 Subject: [PATCH] nut: 2.8.0 -> 2.8.2 * nut wants to build the new GPIO driver by default. Our libgpiod version isn't compatible and configure fails with checking for libgpiod version via pkg-config (1.0.0 minimum required)... 2.1.3 found checking for libgpiod cflags... -I/nix/store/igaf4d9zr8nmmk91icf7f2w0mw23238p-libgpiod-2.1.3/include checking for libgpiod ldflags... -L/nix/store/igaf4d9zr8nmmk91icf7f2w0mw23238p-libgpiod-2.1.3/lib -lgpiod checking for gpiod.h... yes checking for gpiod_chip_open_by_name... no checking for gpiod_chip_close... yes [...] configure: error: No supported GPIO library was found, required for GPIO driver So disable that for now. * Refresh our search path patch. * solaris-init doesn't exist in the output anymore, so we can remove the removal. --- pkgs/applications/misc/nut/default.nix | 8 +++----- pkgs/applications/misc/nut/hardcode-paths.patch | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) 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 */