Commit Graph

36 Commits

Author SHA1 Message Date
Rick van Schijndel
de7ddb66dd
Merge pull request #253012 from Majiir/fix-nut-scanner-cross
nut: fix nut-scanner cross-compilation
2024-04-04 21:07:07 +02:00
Ivan Petkov
fc004b09e5
nixos/ups: install udev rules for nut
This is necessary to allow the usbhid driver to successfully send
commands to the attached UPS.

It is possible to work around this by explicitly using setting the user
flag (e.g. `upsdrvctl -u root shutdown`), though it is much simpler to
install the udev rules rather than patch things further.
2023-12-10 11:23:37 -08:00
Ivan Petkov
7d9956755e
nut: fix systemd unit patching
The NixOS module will create a file in /etc/nut/nut.conf (not in
/etc/nut.conf) so the systemd units should be patched accordingly.
2023-12-10 11:06:33 -08:00
Ivan Petkov
4a219c8aeb
nut: patch nutshutdown to set a default for NUT_CONFPATH
The way we build the package results in the binaries being hardcoded to
look for $out/etc/ups.conf instead of /etc/nut/ups.conf (where the
module places the file). This results in `upsdrvctl` failing to dispatch
shutdown commands (since it cannot find the configuration) and prevents
a primary monitor from cutting power to the appropriate UPS.

Note that we cannot use `--sysconfdir=/etc/nut` as a configure flag
since that results in the install phase trying to install directly into
/etc/nut which predictably fails in the sandbox.
2023-12-10 10:57:50 -08:00
Sergei Trofimovich
3c555c6729 nut: strip debug symbols from cgi-bin/
Noticed by Majiir Paktu as a `gcc` development bits in the closure.
The change remove 10 dependencies worth of 150MB from the closure:

Before:

    $ nix path-info -rsSh ./result-before | nl | tail -n1
       144  /nix/store/b0jsf912bix056gg3p1nz8lh3yasm82j-nut-2.8.0                             10.0M  567.7M

After:

    $ nix path-info -rsSh ./result | nl | tail -n1
       134  /nix/store/gniv2fpm7qxdiszqwhz81iyvxpc62n52-nut-2.8.0                              9.7M  343.8M
2023-09-23 08:06:29 +01:00
Majiir Paktu
81d20b3065 nut: fix nut-scanner cross-compilation
When cross-compiling, libltdl is not found and that quietly disables
nut-scanner.
2023-09-02 20:22:27 -04:00
Dominik Honnef
a99c630c27
nut: build with libusb 1.0
NUT 2.8.0 adds support for, and defaults to, libusb-1.0.
2023-07-09 23:00:28 +02:00
Dominik Honnef
eef5476659
nut: add support for SNMP and CGI 2023-07-09 23:00:04 +02:00
Dominik Honnef
552efeba59
nut: actually update to 2.8.0
The previous attempt at updating nut forgot to change the fod hash for the source code.
Actually updating to 2.8.0 required some changes to dependencies and the patch
for nut-scanner.

We no longer need --without-hal because HAL support was removed as far
back as verison 2.7.2.
2023-07-09 22:59:29 +02:00
markuskowa
3aacb344c3
Merge pull request #215890 from markuskowa/upd-nut
nut: 2.7.4 -> 2.8.0
2023-03-17 09:49:25 +01:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Artturin
6f6cc4a22d treewide: use toString on list NIX_CFLAGS_COMPILE
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
2023-02-22 21:23:04 +02:00
Markus Kowalewski
47cfb7f090
nut: 2.7.4 -> 2.8.0 2023-02-12 01:18:04 +01:00
Majiir Paktu
76ac62dcdc nut: fix search modes not finding dynamic libs 2022-11-04 14:14:51 -04:00
Jeff Hutchison
7e66d64ed5
nut: fix compile error
Compile was failing with: ISO C++17 does not allow dynamic exception specifications

Installed and tested on x86_64-linux.
2022-04-25 16:58:50 -04:00
Artturin
33cce15e42 treewide: remove meta.repositories
there's no documentation for meta.repositories and its not widely used
2022-03-24 23:56:14 +02:00
Ben Siraphob
5d566c43b4 pkgs/applications: pkgconfig -> pkg-config 2021-01-16 23:49:59 -08:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Jan Tojnar
e89e2edc73
libusb-compat-0_1: rename from libusb 2020-04-28 05:33:41 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Renaud
fd75f27ade
nut: build with openssl 1.1.x
instead of nss (it is upstream preference)
+ update homepage and src URLs to fetch over TLS

Close #67906
2019-11-24 15:54:00 +01:00
Aaron Andersen
4e6b7a51a0 nut: fix broken build 2019-09-13 21:17:05 -04:00
Markus Kowalewski
5194e10968
nut: add licenses 2018-09-01 17:02:12 +02:00
Tad Fisher
e879d7bd84 nut: 2.7.1 -> 2.7.4 2017-04-23 21:21:50 -07:00
Tuomas Tynkkynen
91b40bd9d2 treewide: Mass replace 'libusb}/lib' to refer the 'out' output 2016-01-24 10:03:36 +02:00
Vladimír Čunát
d6349df0dd put systemd unit dirs on the right place
Also see #1936.
2014-03-13 21:44:51 +01:00
Evgeny Egorochkin
c857d90619 nut: update from 2.6.5 to 2.7.1; fix nut-scanner 2013-12-21 02:28:24 +02:00
Lluís Batlle i Rossell
4e94dafa4e nut: adding libtool enables nut-scanner 2013-07-19 16:33:42 +02:00
Eelco Dolstra
0a47a28f1d Merge remote-tracking branch 'origin/master' into stdenv-updates 2013-01-22 23:23:53 +01:00
Eelco Dolstra
ab3eeabfed Rename buildNativeInputs -> nativeBuildInputs
Likewise for propagatedBuildNativeInputs, etc.  "buildNativeInputs"
sounds like an imperative rather than a noun phrase.
2012-12-28 19:20:09 +01:00
Eelco Dolstra
fd6941ad48 nut: Update to 2.6.5 and fix building against systemd
http://hydra.nixos.org/build/3473781
2012-12-12 16:17:47 +01:00
Eelco Dolstra
7f053d6157 Remove HAL
It's obsolete.  There was only one package still using it (nut) but it
builds fine without it.
2012-09-28 12:15:12 -04:00
Yury G. Kudryashov
f943cf8d81 nut-2.6.3: add freeipmi support
svn path=/nixpkgs/trunk/; revision=33478
2012-03-29 20:44:20 +00:00
Yury G. Kudryashov
c6c798df43 Add nut-2.6.3 without HAL support
I'm not a nut user, so I didn't touch the default nut expression, and set
meta.priority to 10.

svn path=/nixpkgs/trunk/; revision=33477
2012-03-29 19:01:42 +00:00
Karn Kallio
b8950a9504 Fix some semicolons.
svn path=/nixpkgs/trunk/; revision=27456
2011-06-14 15:29:40 +00:00
Nicolas Pierron
9451c1e2ca Add NUT package.
svn path=/nixpkgs/trunk/; revision=27448
2011-06-14 02:41:01 +00:00