Many packages have some kind of flag indicating whether or not to build with
systemd support. Most of these default to `stdenv.isLinux`, but systemd does
not build on (and is marked `broken` for) `isStatic`. Only a few packages have
the needed `&& !isStatic` in the default value for their parameter.
This commit moves the logic for the default value of these flags into
`systemd.meta.{platforms,badPlatforms}` and evaluates those conditions using
`lib.meta.availableOn`.
This provides three benefits:
1. The default values are set correctly (i.e. including `&& isStatic`)
2. The default values are set consistently
3. The way is paved for any future non-Linux systemd platforms (FreeBSD is
reported to have experimental systemd support)
Also, increase the minimum version that requires iproute2 (for documentation
purposes only, since we are upgrading to a later version). Until 2.5.4, iproute2
was required to set the MAC address on the VPN interface.
The string replacement we were doing was just too brittle, so wrap the
script with a modified PATH instead as it is less likely to break on new
versions.
Semi-automatic update. These checks were done:
- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 2.4.5 with grep in /nix/store/a2wdxd4c08b1gilnj2mcvkmvpnqxw942-openvpn-2.4.5
- found 2.4.5 in filename of file in /nix/store/a2wdxd4c08b1gilnj2mcvkmvpnqxw942-openvpn-2.4.5
systemd is a fairly large dependency, and it doesn't appear to
be necessary in all circumstances - e.g. when openvpn is
not run as a systemd service (as is usually the case when it is
run in a Docker container).
This change makes the dependency on systemd optional, controlled
by a new argument `useSystemd`. The default behaviour remains
the same as it was before this change: enabled only on Linux systems.
For me, this change reduces the size of my container image (dominated
by the closure of openvpn) from about 110 MB to 45 MB.
Version 2: rename argument to `useSystemd` (was `systemdSupport`), and
rebase onto master
* pkgs: refactor needless quoting of homepage meta attribute
A lot of packages are needlessly quoting the homepage meta attribute
(about 1400, 22%), this commit refactors all of those instances.
* pkgs: Fixing some links that were wrongfully unquoted in the previous
commit
* Fixed some instances