forked from mirrors/nixpkgs
Merge pull request #192197 from amjoseph-nixpkgs/pr/system/isSystemd
treewide: systemdSupport: use lib.meta.availableOn
This commit is contained in:
commit
d99d2ceec6
|
@ -78,10 +78,15 @@ rec {
|
|||
|
||||
2. (modern) a pattern for the platform `parsed` field.
|
||||
|
||||
3. (functional) a predicate function returning a boolean.
|
||||
|
||||
We can inject these into a pattern for the whole of a structured platform,
|
||||
and then match that.
|
||||
*/
|
||||
platformMatch = platform: elem: let
|
||||
platformMatch = platform: elem:
|
||||
if builtins.isFunction elem
|
||||
then elem platform
|
||||
else let
|
||||
pattern =
|
||||
if builtins.isString elem
|
||||
then { system = elem; }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
# optional server deps
|
||||
, libmicrohttpd
|
||||
, libsodium
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, systemd ? null
|
||||
|
||||
# options
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
, pkg-config
|
||||
, scdoc
|
||||
, stdenv
|
||||
, systemdSupport ? stdenv.isLinux, systemd
|
||||
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
, ungoogled ? false, ungoogled-chromium
|
||||
# Optional dependencies:
|
||||
, libgcrypt ? null # cupsSupport
|
||||
, systemdSupport ? stdenv.isLinux
|
||||
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, systemd
|
||||
}:
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
, Security
|
||||
, withKeyring ? true
|
||||
, libsecret
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, systemd
|
||||
}:
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
, enableQt ? false
|
||||
, qt5
|
||||
, nixosTests
|
||||
, enableSystemd ? stdenv.isLinux
|
||||
, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, enableDaemon ? true
|
||||
, enableCli ? true
|
||||
, installLib ? false
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
, curl
|
||||
, sqlite
|
||||
, libnotify
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, systemd
|
||||
}:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
, fetchurl
|
||||
, pkg-config
|
||||
, expat
|
||||
, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isStatic
|
||||
, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal
|
||||
, systemdMinimal
|
||||
, audit
|
||||
, libapparmor
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
, zlib
|
||||
, icu
|
||||
, systemd
|
||||
, systemdSupport ? stdenv.hostPlatform.isLinux
|
||||
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
, addOpenGLRunpath
|
||||
, enableGeoLocation ? true
|
||||
, withLibsecret ? true
|
||||
, systemdSupport ? stdenv.isLinux
|
||||
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
, systemd
|
||||
, check
|
||||
, subunit
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
, libtiff
|
||||
, pam
|
||||
, dbus
|
||||
, enableSystemd ? stdenv.isLinux
|
||||
, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, systemd
|
||||
, acl
|
||||
, gmp
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -714,6 +714,7 @@ stdenv.mkDerivation {
|
|||
description = "A system and service manager for Linux";
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
badPlatforms = [ (plat: plat.isStatic) ];
|
||||
# https://github.com/systemd/systemd/issues/20600#issuecomment-912338965
|
||||
broken = stdenv.hostPlatform.isStatic;
|
||||
priority = 10;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -26,8 +26,7 @@
|
|||
, python3
|
||||
, rustPlatform
|
||||
, openssl
|
||||
, systemd
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
|
||||
, zlib
|
||||
, rsync
|
||||
, withCockpit ? true
|
||||
|
|
|
@ -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
|
||||
}:
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
, libuv
|
||||
, libwebsockets
|
||||
, openssl
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, systemd
|
||||
, fetchpatch
|
||||
}:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
, systemd
|
||||
, wafHook
|
||||
, websocketpp
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, withWebSocket ? true
|
||||
}:
|
||||
|
||||
|
|
|
@ -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
|
||||
}:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -271,7 +271,7 @@ let
|
|||
sourceProvenance = listOf lib.types.attrs;
|
||||
maintainers = listOf (attrsOf anything); # TODO use the maintainer type from lib/tests/maintainer-module.nix
|
||||
priority = int;
|
||||
platforms = listOf (either str (attrsOf anything)); # see lib.meta.platformMatch
|
||||
platforms = listOf (oneOf [ str (attrsOf anything) (functionTo bool) ]); # see lib.meta.platformMatch
|
||||
hydraPlatforms = listOf str;
|
||||
broken = bool;
|
||||
unfree = bool;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
}:
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
, pkg-config
|
||||
, systemd
|
||||
, hostname
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, extraTags ? [ ]
|
||||
}:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
, openssl
|
||||
, ppp
|
||||
, systemd
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, withPpp ? stdenv.isLinux
|
||||
}:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
, enableCommandNotFound ? false
|
||||
, enableBashCompletion ? false
|
||||
, bash-completion ? null
|
||||
, enableSystemd ? stdenv.isLinux
|
||||
, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, systemd
|
||||
}:
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
, xz
|
||||
|
||||
# Conditionally recommended
|
||||
, systemdSupport ? stdenv.isLinux
|
||||
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, systemd
|
||||
|
||||
# Recommended
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
, fastJson
|
||||
, withKrb5 ? true
|
||||
, libkrb5
|
||||
, withSystemd ? stdenv.isLinux
|
||||
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, systemd
|
||||
, withJemalloc ? true
|
||||
, jemalloc
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue