about summary refs log tree commit diff
path: root/pkgs/misc/cups
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
commit716aac2519a7571e7f5fd984a886d579a4a051c5 (patch)
tree53cf89cf764d787f4dc8f08474479892b9733177 /pkgs/misc/cups
parentf8472457a440de3c44f6f604142d678b6ae2a762 (diff)
parent53b389327e34de319dc0dbda2b6bcab1a69db69d (diff)
downloadnixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.gz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.bz2
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.lz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.xz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.zst
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.zip
Merge branch 'staging' into closure-size
Diffstat (limited to 'pkgs/misc/cups')
-rw-r--r--pkgs/misc/cups/cups-pk-helper.nix21
-rw-r--r--pkgs/misc/cups/default.nix15
-rw-r--r--pkgs/misc/cups/drivers/cups-bjnp/default.nix6
3 files changed, 38 insertions, 4 deletions
diff --git a/pkgs/misc/cups/cups-pk-helper.nix b/pkgs/misc/cups/cups-pk-helper.nix
new file mode 100644
index 000000000000..b3d289df551c
--- /dev/null
+++ b/pkgs/misc/cups/cups-pk-helper.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, intltool, pkgconfig, glib, polkit, cups }:
+
+stdenv.mkDerivation rec {
+  version = "0.2.5";
+  name = "cups-pk-helper-${version}";
+
+  src = fetchurl {
+    url = "http://www.freedesktop.org/software/cups-pk-helper/releases/cups-pk-helper-${version}.tar.xz";
+    sha256 = "0651ij5p5s0n3xxbaqsy72s22nx9hfkrjgvg766lkqd1cpniw8hr";
+  };
+
+  buildInputs = [ intltool pkgconfig glib polkit cups ];
+
+  meta = with stdenv.lib; {
+    description = "PolicyKit helper to configure cups with fine-grained privileges";
+    homepage = http://www.freedesktop.org/wiki/Software/cups-pk-helper/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix
index fba194aa1527..a63db5441184 100644
--- a/pkgs/misc/cups/default.nix
+++ b/pkgs/misc/cups/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam
-, dbus, acl, gmp
+, dbus, acl, gmp, darwin
 , libusb ? null, gnutls ? null, avahi ? null, libpaper ? null
 }:
 
@@ -19,8 +19,11 @@ stdenv.mkDerivation {
   # FIXME: the cups libraries contains some $out/share strings so can't be split.
   outputs = [ "dev" "out" "doc" "man" ]; # TODO: above
 
-  buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls avahi libpaper ]
-    ++ optionals stdenv.isLinux [ pam dbus acl ];
+  buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls libpaper ]
+    ++ optionals stdenv.isLinux [ avahi pam dbus acl ]
+    ++ optionals stdenv.isDarwin (with darwin; [
+      configd apple_sdk.frameworks.ApplicationServices
+    ]);
 
   propagatedBuildInputs = [ gmp ];
 
@@ -36,7 +39,11 @@ stdenv.mkDerivation {
   ] ++ optional (libusb != null) "--enable-libusb"
     ++ optional (gnutls != null) "--enable-ssl"
     ++ optional (avahi != null) "--enable-avahi"
-    ++ optional (libpaper != null) "--enable-libpaper";
+    ++ optional (libpaper != null) "--enable-libpaper"
+    ++ optionals stdenv.isDarwin [
+    "--with-bundledir=$out"
+    "--disable-launchd"
+  ];
 
   installFlags =
     [ # Don't try to write in /var at build time.
diff --git a/pkgs/misc/cups/drivers/cups-bjnp/default.nix b/pkgs/misc/cups/drivers/cups-bjnp/default.nix
index aa75012a8bc9..60d15ec1282a 100644
--- a/pkgs/misc/cups/drivers/cups-bjnp/default.nix
+++ b/pkgs/misc/cups/drivers/cups-bjnp/default.nix
@@ -14,6 +14,12 @@ stdenv.mkDerivation rec {
   NIX_CFLAGS_COMPILE = "-include stdio.h";
 
   meta = {
+    description = "CUPS back-end for Canon printers";
+    longDescription = ''
+      CUPS back-end for the canon printers using the proprietary USB over IP
+      BJNP protocol. This back-end allows Cups to print over the network to a
+      Canon printer. The design is based on reverse engineering of the protocol.
+    '';
     homepage = http://cups-bjnp.sourceforge.net;
   };
 }