2015-07-21 18:53:55 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, cups, poppler, poppler_utils, fontconfig
|
2015-03-12 08:00:39 +00:00
|
|
|
, libjpeg, libpng, perl, ijs, qpdf, dbus, substituteAll, bash, avahi }:
|
2014-11-23 16:51:55 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "cups-filters-${version}";
|
2015-07-21 18:53:55 +00:00
|
|
|
version = "1.0.71";
|
2014-11-23 16:51:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://openprinting.org/download/cups-filters/${name}.tar.xz";
|
2015-07-21 18:53:55 +00:00
|
|
|
sha256 = "07wwlqcykfjfqcwj1bxk60ggahyaw7wcx32n5s104d1qkhham01i";
|
2014-11-23 16:51:55 +00:00
|
|
|
};
|
|
|
|
|
2015-10-20 01:07:21 +00:00
|
|
|
patches = [
|
|
|
|
./longer-shell-path.patch
|
|
|
|
(fetchpatch { # drop on update
|
|
|
|
name = "poppler-0.34.patch";
|
|
|
|
url = "https://bugs.linuxfoundation.org/attachment.cgi?id=493";
|
|
|
|
sha256 = "18za83q0b0n4hpvvw76jsv0hm89zmijvps2z5kg1srickqlxj891";
|
|
|
|
})
|
|
|
|
];
|
2015-04-02 11:58:09 +00:00
|
|
|
|
2014-12-16 15:20:08 +00:00
|
|
|
buildInputs = [
|
2015-04-03 00:13:26 +00:00
|
|
|
pkgconfig cups poppler poppler_utils fontconfig libjpeg libpng perl
|
2015-03-12 08:00:39 +00:00
|
|
|
ijs qpdf dbus avahi
|
2014-11-23 16:51:55 +00:00
|
|
|
];
|
|
|
|
|
2015-07-21 18:53:55 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-pdftops=pdftops"
|
|
|
|
"--enable-imagefilters"
|
|
|
|
"--with-rcdir=no"
|
|
|
|
"--with-shell=${stdenv.shell}"
|
|
|
|
];
|
2014-12-16 15:20:08 +00:00
|
|
|
|
2014-11-23 16:51:55 +00:00
|
|
|
makeFlags = "CUPS_SERVERBIN=$(out)/lib/cups CUPS_DATADIR=$(out)/share/cups CUPS_SERVERROOT=$(out)/etc/cups";
|
|
|
|
|
2014-12-16 15:20:08 +00:00
|
|
|
postConfigure =
|
|
|
|
''
|
2014-12-16 17:15:52 +00:00
|
|
|
# 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.)
|
2014-12-16 15:20:08 +00:00
|
|
|
substituteInPlace config.h --replace ${cups}/share/cups/data $out/share/cups/data
|
2014-12-16 17:15:52 +00:00
|
|
|
|
|
|
|
# Ensure that gstoraster can find gs in $PATH.
|
|
|
|
substituteInPlace filter/gstoraster.c --replace execve execvpe
|
2014-12-16 15:20:08 +00:00
|
|
|
'';
|
|
|
|
|
2014-12-16 15:41:35 +00:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
for i in $out/lib/cups/filter/{pstopdf,texttops,imagetops}; do
|
|
|
|
substituteInPlace $i --replace 'which ' 'type -p '
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2014-11-23 16:51:55 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|