about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/services/printing/cupsd.nix4
-rw-r--r--pkgs/misc/cups/filters.nix30
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 33 insertions, 3 deletions
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix
index fab1318f5b9e6..fb6e2b9059061 100644
--- a/nixos/modules/services/printing/cupsd.nix
+++ b/nixos/modules/services/printing/cupsd.nix
@@ -107,7 +107,7 @@ in
         type = types.listOf types.path;
         example = literalExample "[ pkgs.splix ]";
         description = ''
-          CUPS drivers to use. Drivers provided by CUPS, Ghostscript
+          CUPS drivers to use. Drivers provided by CUPS, cups-filters, Ghostscript
           and Samba are added unconditionally.
         '';
       };
@@ -175,7 +175,7 @@ in
       };
 
     services.printing.drivers =
-      [ pkgs.cups pkgs.ghostscript additionalBackends
+      [ pkgs.cups pkgs.ghostscript pkgs.cups_filters additionalBackends
         pkgs.perl pkgs.coreutils pkgs.gnused pkgs.bc pkgs.gawk pkgs.gnugrep
       ];
 
diff --git a/pkgs/misc/cups/filters.nix b/pkgs/misc/cups/filters.nix
new file mode 100644
index 0000000000000..31ef0bc0efcda
--- /dev/null
+++ b/pkgs/misc/cups/filters.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, pkgconfig, cups, poppler, fontconfig
+, libjpeg, libpng, perl, ijs, qpdf, dbus }:
+
+stdenv.mkDerivation rec {
+  name = "cups-filters-${version}";
+  version = "1.0.61";
+
+  src = fetchurl {
+    url = "http://openprinting.org/download/cups-filters/${name}.tar.xz";
+    sha256 = "1bq48nnrarlbf6qc93bz1n5wlh6j420gppbck3r45sinwhz5wa7m";
+  };
+
+  buildInputs = [ 
+    pkgconfig cups poppler fontconfig libjpeg libpng perl
+    ijs qpdf dbus
+  ];
+
+  preBuild = ''
+    substituteInPlace Makefile --replace "/etc/rc.d" "$out/etc/rc.d"
+  '';
+  configureFlags = "--with-pdftops=pdftops --enable-imagefilters";
+  makeFlags = "CUPS_SERVERBIN=$(out)/lib/cups CUPS_DATADIR=$(out)/share/cups CUPS_SERVERROOT=$(out)/etc/cups";
+
+  meta = {
+    homepage = http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters;
+    description = "Backends, filters, and other software that was once part of the core CUPS distribution but is no longer maintained by Apple Inc";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c64da1e54f9dc..479f5fe6e96a7 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -12332,7 +12332,7 @@ let
 
   cups = callPackage ../misc/cups { libusb = libusb1; };
 
-  cups_pdf_filter = callPackage ../misc/cups/pdf-filter.nix { };
+  cups_filters = callPackage ../misc/cups/filters.nix { };
 
   crashplan = callPackage ../applications/backup/crashplan { };