From c99249d0c23e8ee1bfbbd178ddf388942b739466 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 20 Jan 2012 18:08:50 +0000 Subject: [PATCH] cups: blind attempt to fix the CUPS build for non-Linux platforms, particularly Darwin svn path=/nixpkgs/trunk/; revision=31745 --- pkgs/misc/cups/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index 8a9efdedcf97..c8a01ad8a10c 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -13,7 +13,14 @@ stdenv.mkDerivation { sha256 = "1xlnkdqldq81pdqgisqbyh92k249bzz35m1f5bp4la06p00ksvjf"; }; - buildInputs = [ pkgconfig zlib libjpeg libpng libtiff pam dbus libusb acl ]; + # The following code looks strange, but it had to be arranged like + # this in order to avoid major rebuilds while testing portability to + # non-Linux platforms. This should be cleaned once the expression is + # stable. + buildInputs = [ pkgconfig zlib libjpeg libpng libtiff ] + ++ stdenv.lib.optionals stdenv.isLinux [ pam ] + ++ [ dbus libusb ] + ++ stdenv.lib.optionals stdenv.isLinux [ acl ] ; propagatedBuildInputs = [ openssl ]; @@ -41,7 +48,7 @@ stdenv.mkDerivation { homepage = http://www.cups.org/; description = "A standards-based printing system for UNIX"; license = "GPLv2"; # actually LGPL for the library and GPL for the rest - maintainers = [ stdenv.lib.maintainers.urkud ]; - platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.urkud stdenv.lib.maintainers.simons ]; + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; }; }