cups: enable compiling with musl

When compiling `cups` with `pkgsMusl`, `cups` can't depend on `systemd`
because `systemd` is not able to be built with musl.
This commit is contained in:
(cdep)illabout 2019-10-21 15:11:29 -04:00 committed by Niklas Hambüchen
parent 97a5c413a0
commit 664823c11c

View File

@ -1,9 +1,27 @@
{ stdenv, fetchurl, pkgconfig, removeReferencesTo
, zlib, libjpeg, libpng, libtiff, pam, dbus, systemd, acl, gmp, darwin
, libusb ? null, gnutls ? null, avahi ? null, libpaper ? null
{ stdenv
, fetchurl
, pkgconfig
, removeReferencesTo
, zlib
, libjpeg
, libpng
, libtiff
, pam
, dbus
, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isMusl
, systemd ? null
, acl
, gmp
, darwin
, libusb ? null
, gnutls ? null
, avahi ? null
, libpaper ? null
, coreutils
}:
assert enableSystemd -> systemd != null;
### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test
### works at least for your platform.
@ -33,7 +51,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig removeReferencesTo ];
buildInputs = [ zlib libjpeg libpng libtiff libusb gnutls libpaper ]
++ optionals stdenv.isLinux [ avahi pam dbus systemd acl ]
++ optionals stdenv.isLinux [ avahi pam dbus ]
++ optional enableSystemd systemd
# Separate from above only to not modify order, to avoid mass rebuilds; merge this with the above at next big change.
++ optionals stdenv.isLinux [ acl ]
++ optionals stdenv.isDarwin (with darwin; [
configd apple_sdk.frameworks.ApplicationServices
]);