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.
This commit is contained in:
Bjørn Forsman 2024-08-13 12:21:00 +02:00
parent daf7bb9582
commit d43eae54d3
2 changed files with 6 additions and 8 deletions

View File

@ -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
'';

View File

@ -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 */