2009-08-28 01:32:13 +02:00
|
|
|
# this package was called gimp-print in the past
|
2016-01-17 01:29:56 +01:00
|
|
|
{ stdenv, lib, fetchurl, pkgconfig
|
|
|
|
, ijs, makeWrapper
|
2016-02-26 15:14:21 +01:00
|
|
|
, gimp2Support ? false, gimp
|
2016-01-17 01:29:56 +01:00
|
|
|
, cupsSupport ? true, cups, libusb, perl
|
|
|
|
}:
|
2009-08-28 01:32:13 +02:00
|
|
|
|
2016-01-17 01:29:56 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-08-02 10:56:16 +02:00
|
|
|
name = "gutenprint-5.2.13";
|
2009-08-28 01:32:13 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-01-17 01:29:56 +01:00
|
|
|
url = "mirror://sourceforge/gimp-print/${name}.tar.bz2";
|
2017-08-02 10:56:16 +02:00
|
|
|
sha256 = "0hi7s0y59306p4kp06sankfa57k2805khbknkvl9d036hdfp9afr";
|
2009-08-28 01:32:13 +02:00
|
|
|
};
|
|
|
|
|
2016-01-17 01:29:56 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
|
|
|
buildInputs =
|
|
|
|
[ ijs ]
|
|
|
|
++ lib.optionals gimp2Support [ gimp.gtk gimp ]
|
|
|
|
++ lib.optionals cupsSupport [ cups libusb perl ];
|
|
|
|
|
|
|
|
configureFlags = lib.optionals cupsSupport [
|
|
|
|
"--disable-static-genppd" # should be harmless on NixOS
|
|
|
|
];
|
2009-08-28 01:32:13 +02:00
|
|
|
|
2016-02-26 15:14:21 +01:00
|
|
|
# FIXME: hacky because we modify generated configure, but I haven't found a better way.
|
|
|
|
# makeFlags doesn't change this everywhere (e.g. in cups-genppdupdate).
|
|
|
|
preConfigure = lib.optionalString cupsSupport ''
|
|
|
|
sed -i \
|
|
|
|
-e "s,cups_conf_datadir=.*,cups_conf_datadir=\"$out/share/cups\",g" \
|
|
|
|
-e "s,cups_conf_serverbin=.*,cups_conf_serverbin=\"$out/lib/cups\",g" \
|
|
|
|
-e "s,cups_conf_serverroot=.*,cups_conf_serverroot=\"$out/etc/cups\",g" \
|
|
|
|
configure
|
|
|
|
'' + lib.optionalString gimp2Support ''
|
|
|
|
sed -i \
|
|
|
|
-e "s,gimp2_plug_indir=.*,gimp2_plug_indir=\"$out/lib/gimp/${gimp.majorVersion}\",g" \
|
|
|
|
configure
|
|
|
|
'';
|
|
|
|
|
2016-01-17 01:29:56 +01:00
|
|
|
enableParallelBuilding = true;
|
2009-08-28 01:32:13 +02:00
|
|
|
|
2016-01-17 01:29:56 +01:00
|
|
|
# Testing is very, very long.
|
|
|
|
# doCheck = true;
|
2009-08-28 01:32:13 +02:00
|
|
|
|
2016-01-17 01:29:56 +01:00
|
|
|
meta = with stdenv.lib; {
|
2009-08-28 01:32:13 +02:00
|
|
|
description = "Ghostscript and cups printer drivers";
|
|
|
|
homepage = http://sourceforge.net/projects/gimp-print/;
|
2016-01-17 01:29:56 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2009-08-28 01:32:13 +02:00
|
|
|
};
|
|
|
|
}
|