diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index fab1318f5b9e..9e0f8a227e9f 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -175,7 +175,7 @@ in }; services.printing.drivers = - [ pkgs.cups pkgs.ghostscript additionalBackends + [ pkgs.cups pkgs.cups-filters pkgs.ghostscript additionalBackends pkgs.perl pkgs.coreutils pkgs.gnused pkgs.bc pkgs.gawk pkgs.gnugrep ]; diff --git a/pkgs/misc/cups/drivers/cups-filters/default.nix b/pkgs/misc/cups/drivers/cups-filters/default.nix new file mode 100644 index 000000000000..0357b875dc71 --- /dev/null +++ b/pkgs/misc/cups/drivers/cups-filters/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchurl, autoreconfHook, pkgconfig, cups, libjpeg, ghostscript +, dejavu_fonts, libpng, libtiff, glib, lcms, freetype, fontconfig, ijs, poppler +, zlib, qpdf, dbus }: + +stdenv.mkDerivation rec { + name = "cups-filters-1.0.61"; + + src = fetchurl { + url = "https://www.openprinting.org/download/cups-filters/${name}.tar.gz"; + sha256 = "0mri36qih4vniycbga8aczmdf0qkiwyyi5hv8x9mg2f6a9wj8ch9"; + }; + + configureFlags = [ "--with-test-font-path=${dejavu_fonts}/share/fonts/truetype/DejaVuSans.ttf" + "--with-cups-domainsocket=/var/run/cups/cups.sock" + "--with-rcdir=no" + ]; + + buildInputs = [ ghostscript cups libjpeg libpng libtiff glib lcms freetype fontconfig + poppler zlib ijs qpdf dbus + ]; + + patches = [ ./fix-cups-path.patch ]; + + nativeBuildInputs = [ pkgconfig autoreconfHook ]; + + doCheck = true; + + meta = with stdenv.lib; { + 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"; + license = "cups-filters"; + maintainers = maintainers.abbradar; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/misc/cups/drivers/cups-filters/fix-cups-path.patch b/pkgs/misc/cups/drivers/cups-filters/fix-cups-path.patch new file mode 100644 index 000000000000..6e6683220611 --- /dev/null +++ b/pkgs/misc/cups/drivers/cups-filters/fix-cups-path.patch @@ -0,0 +1,26 @@ +diff -ru3 cups-filters-1.0.61-old/configure.ac cups-filters-1.0.61/configure.ac +--- cups-filters-1.0.61-old/configure.ac 2014-11-04 23:48:35.185515564 +0300 ++++ cups-filters-1.0.61/configure.ac 2014-11-05 00:01:57.132038500 +0300 +@@ -92,11 +92,11 @@ + AC_SUBST(CUPS_CFLAGS) + AC_SUBST(CUPS_LIBS) + +-CUPS_DATADIR="`$CUPSCONFIG --datadir`" ++CUPS_DATADIR="$out/share/cups" + AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$CUPS_DATADIR", [CUPS datadir]) + AC_SUBST(CUPS_DATADIR) + +-CUPS_SERVERROOT="`$CUPSCONFIG --serverroot`" ++CUPS_SERVERROOT="$out/etc/cups" + AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$CUPS_SERVERROOT", [CUPS serverroot]) + AC_SUBST(CUPS_SERVERROOT) + +@@ -104,7 +104,7 @@ + AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH", [Path to CUPS fonts dir]) + AC_SUBST(CUPS_FONTPATH) + +-CUPS_SERVERBIN="`$CUPSCONFIG --serverbin`" ++CUPS_SERVERBIN="$out/lib/cups" + AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN", [Path to CUPS binaries dir]) + AC_SUBST(CUPS_SERVERBIN) + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8128620b2e21..c6548b1b73f2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12314,6 +12314,7 @@ let cups = callPackage ../misc/cups { libusb = libusb1; }; + cups-filters = callPackage ../misc/cups/drivers/cups-filters { }; crashplan = callPackage ../applications/backup/crashplan { };