@@ -1,9 +1,27 @@
1−{ stdenv, fetchurl, pkgconfig, removeReferencesTo
2−, zlib, libjpeg, libpng, libtiff, pam, dbus, systemd, acl, gmp, darwin
3−, libusb ? null, gnutls ? null, avahi ? null, libpaper ? null
1+{ stdenv
2+, fetchurl
3+, pkgconfig
4+, removeReferencesTo
5+, zlib
6+, libjpeg
7+, libpng
8+, libtiff
9+, pam
10+, dbus
11+, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isMusl
12+, systemd ? null
13+, acl
14+, gmp
15+, darwin
16+, libusb ? null
17+, gnutls ? null
18+, avahi ? null
19+, libpaper ? null
420, coreutils
521}:
622
23+assert enableSystemd -> systemd != null;
24+
725### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test
826### works at least for your platform.
927
@@ -33,7 +51,10 @@ stdenv.mkDerivation rec {
3351 nativeBuildInputs = [ pkgconfig removeReferencesTo ];
3452
3553 buildInputs = [ zlib libjpeg libpng libtiff libusb gnutls libpaper ]
36− ++ optionals stdenv.isLinux [ avahi pam dbus systemd acl ]
54+ ++ optionals stdenv.isLinux [ avahi pam dbus ]
55+ ++ optional enableSystemd systemd
56+ # Separate from above only to not modify order, to avoid mass rebuilds; merge this with the above at next big change.
57+ ++ optionals stdenv.isLinux [ acl ]
3758 ++ optionals stdenv.isDarwin (with darwin; [
3859 configd apple_sdk.frameworks.ApplicationServices
3960 ]);