about summary refs log tree commit diff
path: root/pkgs/misc/cups/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/misc/cups/default.nix')
-rw-r--r--pkgs/misc/cups/default.nix16
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix
index 56461f2e85888..d8dfd95502ed9 100644
--- a/pkgs/misc/cups/default.nix
+++ b/pkgs/misc/cups/default.nix
@@ -1,8 +1,9 @@
 { stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam, openssl
 , dbus, libusb, acl }:
 
-let version = "1.5.0"; in
-
+let
+  version = "1.5.0";
+in
 stdenv.mkDerivation {
   name = "cups-${version}";
 
@@ -13,7 +14,14 @@ stdenv.mkDerivation {
     sha256 = "0czc0bmrm31jy03inm6w2mbr5s9q9xk6s1x5x4kddx2qlml9pyf6";
   };
 
-  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 ];
 
@@ -42,6 +50,6 @@ stdenv.mkDerivation {
     description = "A standards-based printing system for UNIX";
     license = stdenv.lib.licenses.gpl2; # actually LGPL for the library and GPL for the rest
     maintainers = [ stdenv.lib.maintainers.urkud stdenv.lib.maintainers.simons ];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
   };
 }