Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cups: enable compiling with musl #71575

Merged
merged 1 commit into from
Oct 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions pkgs/misc/cups/default.nix
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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
]);
Expand Down