From 0aa452e1797c811adb3038f086908c7c03079a0b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 16 Dec 2014 16:20:08 +0100 Subject: [PATCH] cups-filters: Fix banners It was looking in cups' prefix for the PDF templates. So for instance printing a CUPS test page wouldn't work. --- pkgs/misc/cups/filters.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/cups/filters.nix b/pkgs/misc/cups/filters.nix index 31ef0bc0efc..6ec1840fb6c 100644 --- a/pkgs/misc/cups/filters.nix +++ b/pkgs/misc/cups/filters.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "1bq48nnrarlbf6qc93bz1n5wlh6j420gppbck3r45sinwhz5wa7m"; }; - buildInputs = [ + buildInputs = [ pkgconfig cups poppler fontconfig libjpeg libpng perl ijs qpdf dbus ]; @@ -18,9 +18,19 @@ stdenv.mkDerivation rec { 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"; + # Ensure that bannertopdf can find the PDF templates in $out. (By + # default, it assumes that cups and cups-filters are installed in + # the same prefix.) + postConfigure = + '' + substituteInPlace config.h --replace ${cups}/share/cups/data $out/share/cups/data + ''; + 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";