From 42815b4a0ca4b1a433ce58f7bf92fb5fa1aec064 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 21 Sep 2022 00:04:52 -0700 Subject: [PATCH] treewide: systemdSupport: use lib.meta.availableOn 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) --- pkgs/applications/audio/musikcube/default.nix | 8 ++++---- pkgs/applications/editors/emacs/generic.nix | 2 +- pkgs/applications/graphics/drawpile/default.nix | 2 +- pkgs/applications/misc/prusa-slicer/default.nix | 3 +-- pkgs/applications/misc/seatd/default.nix | 2 +- pkgs/applications/networking/browsers/chromium/common.nix | 2 +- pkgs/applications/networking/msmtp/default.nix | 2 +- pkgs/applications/networking/p2p/transmission/default.nix | 2 +- pkgs/applications/networking/sync/onedrive/default.nix | 2 +- pkgs/applications/virtualization/docker/default.nix | 2 +- pkgs/applications/window-managers/sway/default.nix | 3 +-- pkgs/applications/window-managers/sway/idle.nix | 2 +- pkgs/development/interpreters/erlang/generic-builder.nix | 2 +- pkgs/development/interpreters/php/generic.nix | 2 +- pkgs/development/libraries/dbus/default.nix | 2 +- pkgs/development/libraries/polkit/default.nix | 2 +- pkgs/development/libraries/vte/default.nix | 2 +- pkgs/development/libraries/webkitgtk/default.nix | 2 +- pkgs/development/libraries/yder/default.nix | 2 +- pkgs/misc/cups/default.nix | 2 +- pkgs/misc/screensavers/xscreensaver/default.nix | 2 +- pkgs/os-specific/linux/procps-ng/default.nix | 2 +- pkgs/os-specific/linux/util-linux/default.nix | 2 +- pkgs/servers/ldap/389/default.nix | 3 +-- pkgs/servers/matrix-synapse/default.nix | 3 ++- pkgs/servers/mautrix-facebook/default.nix | 7 ++++--- pkgs/servers/mqtt/mosquitto/default.nix | 2 +- pkgs/servers/nfd/default.nix | 2 +- pkgs/servers/nosql/redis/default.nix | 2 +- pkgs/servers/pulseaudio/default.nix | 2 +- pkgs/servers/uwsgi/default.nix | 2 +- pkgs/tools/misc/brltty/default.nix | 2 +- pkgs/tools/misc/tmux/default.nix | 2 +- pkgs/tools/networking/dd-agent/datadog-agent.nix | 2 +- pkgs/tools/networking/openfortivpn/default.nix | 2 +- pkgs/tools/networking/openvpn/default.nix | 2 +- pkgs/tools/package-management/packagekit/default.nix | 2 +- pkgs/tools/system/htop/default.nix | 3 +-- pkgs/tools/system/hw-probe/default.nix | 2 +- pkgs/tools/system/rsyslog/default.nix | 2 +- pkgs/top-level/beam-packages.nix | 6 ++++-- 41 files changed, 51 insertions(+), 51 deletions(-) diff --git a/pkgs/applications/audio/musikcube/default.nix b/pkgs/applications/audio/musikcube/default.nix index 38e96c7f098e..7dd7670d67f7 100644 --- a/pkgs/applications/audio/musikcube/default.nix +++ b/pkgs/applications/audio/musikcube/default.nix @@ -1,4 +1,6 @@ -{ cmake +{ lib +, stdenv +, cmake , pkg-config , boost , curl @@ -12,13 +14,11 @@ , libopenmpt , mpg123 , ncurses -, lib -, stdenv , taglib # Linux Dependencies , alsa-lib , pulseaudio -, systemdSupport ? stdenv.isLinux +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd # Darwin Dependencies , Cocoa diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index cd68f0dbf5f3..feed7ba5b41e 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -44,7 +44,7 @@ else if withMotif then "motif" else if withAthena then "athena" else "lucid") -, withSystemd ? stdenv.isLinux, systemd +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: assert (libXft != null) -> libpng != null; # probably a bug diff --git a/pkgs/applications/graphics/drawpile/default.nix b/pkgs/applications/graphics/drawpile/default.nix index 09d51db254ba..76409860ffa9 100644 --- a/pkgs/applications/graphics/drawpile/default.nix +++ b/pkgs/applications/graphics/drawpile/default.nix @@ -25,7 +25,7 @@ # optional server deps , libmicrohttpd , libsodium -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd ? null # options diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index 14a0d4453a25..c0a1e7e0217d 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -26,12 +26,11 @@ , openvdb , pcre , qhull -, systemd , tbb , wxGTK31 , xorg , fetchpatch -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: let wxGTK-prusa = wxGTK31.overrideAttrs (old: rec { diff --git a/pkgs/applications/misc/seatd/default.nix b/pkgs/applications/misc/seatd/default.nix index 8c10219903db..f9a7cc928e10 100644 --- a/pkgs/applications/misc/seatd/default.nix +++ b/pkgs/applications/misc/seatd/default.nix @@ -5,7 +5,7 @@ , pkg-config , scdoc , stdenv -, systemdSupport ? stdenv.isLinux, systemd +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: stdenv.mkDerivation rec { diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 50cbc80e0c7e..23b47c84555f 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -45,7 +45,7 @@ , ungoogled ? false, ungoogled-chromium # Optional dependencies: , libgcrypt ? null # cupsSupport -, systemdSupport ? stdenv.isLinux +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd }: diff --git a/pkgs/applications/networking/msmtp/default.nix b/pkgs/applications/networking/msmtp/default.nix index 904239960181..479d0980919c 100644 --- a/pkgs/applications/networking/msmtp/default.nix +++ b/pkgs/applications/networking/msmtp/default.nix @@ -17,7 +17,7 @@ , Security , withKeyring ? true , libsecret -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd }: diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix index f3a33c2194cb..8d605877a62e 100644 --- a/pkgs/applications/networking/p2p/transmission/default.nix +++ b/pkgs/applications/networking/p2p/transmission/default.nix @@ -24,7 +24,7 @@ , enableQt ? false , qt5 , nixosTests -, enableSystemd ? stdenv.isLinux +, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , enableDaemon ? true , enableCli ? true , installLib ? false diff --git a/pkgs/applications/networking/sync/onedrive/default.nix b/pkgs/applications/networking/sync/onedrive/default.nix index d928978d3cf8..6c64b755be0a 100644 --- a/pkgs/applications/networking/sync/onedrive/default.nix +++ b/pkgs/applications/networking/sync/onedrive/default.nix @@ -8,7 +8,7 @@ , curl , sqlite , libnotify -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd }: diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index fff9200285aa..5027a8fd5c91 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -15,7 +15,7 @@ rec { , iptables, e2fsprogs, xz, util-linux, xfsprogs, git , procps, rootlesskit, slirp4netns, fuse-overlayfs, nixosTests , clientOnly ? !stdenv.isLinux, symlinkJoin - , withSystemd ? stdenv.isLinux, systemd + , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd , withBtrfs ? stdenv.isLinux, btrfs-progs , withLvm ? stdenv.isLinux, lvm2 , withSeccomp ? stdenv.isLinux, libseccomp diff --git a/pkgs/applications/window-managers/sway/default.nix b/pkgs/applications/window-managers/sway/default.nix index e49edbd19093..6cfc55240222 100644 --- a/pkgs/applications/window-managers/sway/default.nix +++ b/pkgs/applications/window-managers/sway/default.nix @@ -6,9 +6,8 @@ , nixosTests # Used by the NixOS module: , isNixOS ? false - , enableXWayland ? true, xorg -, systemdSupport ? stdenv.isLinux +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd , dbusSupport ? true , dbus , trayEnabled ? systemdSupport && dbusSupport diff --git a/pkgs/applications/window-managers/sway/idle.nix b/pkgs/applications/window-managers/sway/idle.nix index 6479760a743e..b410919022f1 100644 --- a/pkgs/applications/window-managers/sway/idle.nix +++ b/pkgs/applications/window-managers/sway/idle.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub , meson, ninja, pkg-config, scdoc, wayland-scanner , wayland, wayland-protocols, runtimeShell -, systemdSupport ? stdenv.isLinux, systemd +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: stdenv.mkDerivation rec { diff --git a/pkgs/development/interpreters/erlang/generic-builder.nix b/pkgs/development/interpreters/erlang/generic-builder.nix index bdfca31d7f7f..59e2286f84ee 100644 --- a/pkgs/development/interpreters/erlang/generic-builder.nix +++ b/pkgs/development/interpreters/erlang/generic-builder.nix @@ -21,7 +21,7 @@ , parallelBuild ? false , systemd , wxSupport ? true -, systemdSupport ? stdenv.isLinux # systemd support in epmd +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd # systemd support in epmd # updateScript deps , writeScript , common-updater-scripts diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix index 5a363822bcae..b8ceac621a61 100644 --- a/pkgs/development/interpreters/php/generic.nix +++ b/pkgs/development/interpreters/php/generic.nix @@ -52,7 +52,7 @@ let , cgotoSupport ? false , embedSupport ? false , ipv6Support ? true - , systemdSupport ? stdenv.isLinux + , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd , valgrindSupport ? !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind , ztsSupport ? apxs2Support }@args: diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 795c2c51ddfc..20856f2ad9b8 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -3,7 +3,7 @@ , fetchurl , pkg-config , expat -, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isStatic +, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal , systemdMinimal , audit , libapparmor diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix index 3db9e21bc759..5c67eb1b65db 100644 --- a/pkgs/development/libraries/polkit/default.nix +++ b/pkgs/development/libraries/polkit/default.nix @@ -21,7 +21,7 @@ , docbook_xml_dtd_412 , gtk-doc , coreutils -, useSystemd ? stdenv.isLinux +, useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal , systemdMinimal , elogind # A few tests currently fail on musl (polkitunixusertest, polkitunixgrouptest, polkitidentitytest segfault). diff --git a/pkgs/development/libraries/vte/default.nix b/pkgs/development/libraries/vte/default.nix index f87557ac4623..3a82bafa3e12 100644 --- a/pkgs/development/libraries/vte/default.nix +++ b/pkgs/development/libraries/vte/default.nix @@ -24,7 +24,7 @@ , zlib , icu , systemd -, systemdSupport ? stdenv.hostPlatform.isLinux +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd , nixosTests }: diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index cfff2e7f853d..4e22df60f533 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -63,7 +63,7 @@ , addOpenGLRunpath , enableGeoLocation ? true , withLibsecret ? true -, systemdSupport ? stdenv.isLinux +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/development/libraries/yder/default.nix b/pkgs/development/libraries/yder/default.nix index fb26e27bc3e8..43b181fc348f 100644 --- a/pkgs/development/libraries/yder/default.nix +++ b/pkgs/development/libraries/yder/default.nix @@ -6,7 +6,7 @@ , systemd , check , subunit -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd }: stdenv.mkDerivation rec { diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index b707647377ca..06fdb4d65e72 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -9,7 +9,7 @@ , libtiff , pam , dbus -, enableSystemd ? stdenv.isLinux +, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd , acl , gmp diff --git a/pkgs/misc/screensavers/xscreensaver/default.nix b/pkgs/misc/screensavers/xscreensaver/default.nix index 72e283eaf11c..d2a6dfcec954 100644 --- a/pkgs/misc/screensavers/xscreensaver/default.nix +++ b/pkgs/misc/screensavers/xscreensaver/default.nix @@ -5,7 +5,7 @@ , gtk2, gdk-pixbuf, gdk-pixbuf-xlib, libxml2, pam , systemd, coreutils , forceInstallAllHacks ? false -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd }: stdenv.mkDerivation rec { diff --git a/pkgs/os-specific/linux/procps-ng/default.nix b/pkgs/os-specific/linux/procps-ng/default.nix index c87c337e61c3..67b839a1bd36 100644 --- a/pkgs/os-specific/linux/procps-ng/default.nix +++ b/pkgs/os-specific/linux/procps-ng/default.nix @@ -7,7 +7,7 @@ # `ps` with systemd support is able to properly report different # attributes like unit name, so we want to have it on linux. -, withSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isStatic +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd # procps is mostly Linux-only. Most commands require a running Linux diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 8df231c961e2..eeecc655aef9 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -6,7 +6,7 @@ , ncurses , pamSupport ? true , pam -, systemdSupport ? stdenv.isLinux && !stdenv.hostPlatform.isStatic +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd , nlsSupport ? true , translateManpages ? true diff --git a/pkgs/servers/ldap/389/default.nix b/pkgs/servers/ldap/389/default.nix index ad857703baf3..4478c594330d 100644 --- a/pkgs/servers/ldap/389/default.nix +++ b/pkgs/servers/ldap/389/default.nix @@ -26,8 +26,7 @@ , python3 , rustPlatform , openssl -, systemd -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd , zlib , rsync , withCockpit ? true diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index 778444eda078..18041897f232 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -1,5 +1,6 @@ { lib, stdenv, fetchFromGitHub, python3, openssl, rustPlatform -, enableSystemd ? stdenv.isLinux, nixosTests +, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd +, nixosTests , enableRedis ? true , callPackage }: diff --git a/pkgs/servers/mautrix-facebook/default.nix b/pkgs/servers/mautrix-facebook/default.nix index e8eb6a8b86b6..fcef839a9ddf 100644 --- a/pkgs/servers/mautrix-facebook/default.nix +++ b/pkgs/servers/mautrix-facebook/default.nix @@ -1,9 +1,10 @@ -{ enableSystemd ? stdenv.isLinux +{ lib +, stdenv +, systemd +, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , fetchFromGitHub , fetchpatch -, lib , python3 -, stdenv }: python3.pkgs.buildPythonPackage rec { diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix index 0c574e599757..f241f48ac52e 100644 --- a/pkgs/servers/mqtt/mosquitto/default.nix +++ b/pkgs/servers/mqtt/mosquitto/default.nix @@ -10,7 +10,7 @@ , libuv , libwebsockets , openssl -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd , fetchpatch }: diff --git a/pkgs/servers/nfd/default.nix b/pkgs/servers/nfd/default.nix index 08309213aaaf..58c4dd42936e 100644 --- a/pkgs/servers/nfd/default.nix +++ b/pkgs/servers/nfd/default.nix @@ -10,7 +10,7 @@ , systemd , wafHook , websocketpp -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , withWebSocket ? true }: diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index 5ec8361e2d7b..300a5dd20670 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, lua, pkg-config, nixosTests , tcl, which, ps, getconf -, withSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isStatic, systemd +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd # dependency ordering is broken at the moment when building with openssl , tlsSupport ? !stdenv.hostPlatform.isStatic, openssl }: diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 11c56b925412..57977ebf4096 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -9,7 +9,7 @@ , x11Support ? false -, useSystemd ? stdenv.isLinux +, useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , # Whether to support the JACK sound system as a backend. jackaudioSupport ? false diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix index 01fa28d5d41e..0a9ff0bcc1a2 100644 --- a/pkgs/servers/uwsgi/default.nix +++ b/pkgs/servers/uwsgi/default.nix @@ -3,7 +3,7 @@ # plugins: list of strings, eg. [ "python2" "python3" ] , plugins ? [] , pam, withPAM ? stdenv.isLinux -, systemd, withSystemd ? stdenv.isLinux +, systemd, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , libcap, withCap ? stdenv.isLinux , python2, python3, ncurses , ruby, php diff --git a/pkgs/tools/misc/brltty/default.nix b/pkgs/tools/misc/brltty/default.nix index fef13a893728..5838c24172f8 100644 --- a/pkgs/tools/misc/brltty/default.nix +++ b/pkgs/tools/misc/brltty/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, pkg-config, python3, bluez , tcl, acl, kmod, coreutils, shadow, util-linux, udev , alsaSupport ? stdenv.isLinux, alsa-lib -, systemdSupport ? stdenv.isLinux, systemd +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: stdenv.mkDerivation rec { diff --git a/pkgs/tools/misc/tmux/default.nix b/pkgs/tools/misc/tmux/default.nix index 9ffe21c8cf5e..139cadc70642 100644 --- a/pkgs/tools/misc/tmux/default.nix +++ b/pkgs/tools/misc/tmux/default.nix @@ -6,7 +6,7 @@ , libevent , ncurses , pkg-config -, withSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isStatic, systemd +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd , withUtf8proc ? true, utf8proc # gets Unicode updates faster than glibc , withUtempter ? stdenv.isLinux && !stdenv.hostPlatform.isMusl, libutempter }: diff --git a/pkgs/tools/networking/dd-agent/datadog-agent.nix b/pkgs/tools/networking/dd-agent/datadog-agent.nix index a0b3f357950e..b3552a28e531 100644 --- a/pkgs/tools/networking/dd-agent/datadog-agent.nix +++ b/pkgs/tools/networking/dd-agent/datadog-agent.nix @@ -8,7 +8,7 @@ , pkg-config , systemd , hostname -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , extraTags ? [ ] }: diff --git a/pkgs/tools/networking/openfortivpn/default.nix b/pkgs/tools/networking/openfortivpn/default.nix index 0426066995d9..87b7ae1970cb 100644 --- a/pkgs/tools/networking/openfortivpn/default.nix +++ b/pkgs/tools/networking/openfortivpn/default.nix @@ -2,7 +2,7 @@ , openssl , ppp , systemd -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , withPpp ? stdenv.isLinux }: diff --git a/pkgs/tools/networking/openvpn/default.nix b/pkgs/tools/networking/openvpn/default.nix index d13ea566910b..65e20ca67774 100644 --- a/pkgs/tools/networking/openvpn/default.nix +++ b/pkgs/tools/networking/openvpn/default.nix @@ -7,7 +7,7 @@ , openssl , openssl_1_1 , pam -, useSystemd ? stdenv.isLinux +, useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd , update-systemd-resolved , util-linux diff --git a/pkgs/tools/package-management/packagekit/default.nix b/pkgs/tools/package-management/packagekit/default.nix index 95fecd208506..b51a51da84f5 100644 --- a/pkgs/tools/package-management/packagekit/default.nix +++ b/pkgs/tools/package-management/packagekit/default.nix @@ -22,7 +22,7 @@ , enableCommandNotFound ? false , enableBashCompletion ? false , bash-completion ? null -, enableSystemd ? stdenv.isLinux +, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd }: diff --git a/pkgs/tools/system/htop/default.nix b/pkgs/tools/system/htop/default.nix index e3dca89c4646..cb79607ebbf8 100644 --- a/pkgs/tools/system/htop/default.nix +++ b/pkgs/tools/system/htop/default.nix @@ -2,8 +2,7 @@ , ncurses , IOKit , sensorsSupport ? stdenv.isLinux, lm_sensors -, systemdSupport ? stdenv.isLinux && !stdenv.hostPlatform.isStatic -, systemd +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: assert systemdSupport -> stdenv.isLinux; diff --git a/pkgs/tools/system/hw-probe/default.nix b/pkgs/tools/system/hw-probe/default.nix index d483bdad221b..ee538f92668a 100644 --- a/pkgs/tools/system/hw-probe/default.nix +++ b/pkgs/tools/system/hw-probe/default.nix @@ -30,7 +30,7 @@ , xz # Conditionally recommended -, systemdSupport ? stdenv.isLinux +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd # Recommended diff --git a/pkgs/tools/system/rsyslog/default.nix b/pkgs/tools/system/rsyslog/default.nix index 09be16b1c945..859f66990c56 100644 --- a/pkgs/tools/system/rsyslog/default.nix +++ b/pkgs/tools/system/rsyslog/default.nix @@ -10,7 +10,7 @@ , fastJson , withKrb5 ? true , libkrb5 -, withSystemd ? stdenv.isLinux +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd , withJemalloc ? true , jemalloc diff --git a/pkgs/top-level/beam-packages.nix b/pkgs/top-level/beam-packages.nix index 2d0fde6d079c..c727db80db6a 100644 --- a/pkgs/top-level/beam-packages.nix +++ b/pkgs/top-level/beam-packages.nix @@ -1,11 +1,13 @@ -{ beam +{ lib +, beam , callPackage , openssl_1_1 , wxGTK32 , buildPackages , stdenv , wxSupport ? true -, systemdSupport ? stdenv.isLinux +, systemd +, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd }: let