summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/virtualization/docker
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-09-21 00:04:52 -0700
committerAdam Joseph <adam@westernsemico.com>2023-01-22 00:27:19 -0800
commit42815b4a0ca4b1a433ce58f7bf92fb5fa1aec064 (patch)
tree55ec264893a2073faff7462246f8df167b36f415 /pkgs/applications/virtualization/docker
parent5b66b6b8c23bf2003b99fac9fee2c743eb3ac253 (diff)
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)
Diffstat (limited to 'pkgs/applications/virtualization/docker')
-rw-r--r--pkgs/applications/virtualization/docker/default.nix2
1 files changed, 1 insertions, 1 deletions
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