2009-08-28 01:32:13 +02:00
|
|
|
# this package was called gimp-print in the past
|
2010-07-28 13:55:54 +02:00
|
|
|
{ fetchurl, stdenv, pkgconfig, composableDerivation, cups
|
2013-11-10 00:32:17 +01:00
|
|
|
, libtiff, libpng, makeWrapper, openssl, gimp }:
|
2009-08-28 01:32:13 +02:00
|
|
|
|
2009-11-22 20:11:27 +01:00
|
|
|
let
|
2013-11-09 23:02:37 +01:00
|
|
|
version = "5.2.9";
|
2010-07-28 13:55:54 +02:00
|
|
|
inherit (composableDerivation) edf wwf;
|
2009-11-22 20:11:27 +01:00
|
|
|
in
|
2010-07-28 13:55:54 +02:00
|
|
|
|
|
|
|
composableDerivation.composableDerivation {} {
|
2009-11-22 20:11:27 +01:00
|
|
|
name = "gutenprint-${version}";
|
2009-08-28 01:32:13 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-02-09 21:34:52 +01:00
|
|
|
url = "mirror://sourceforge/gimp-print/gutenprint-${version}.tar.bz2";
|
2013-11-09 23:02:37 +01:00
|
|
|
sha256 = "185wai9hk0z0144hpxn5mqncy6xikc4bdv49vxqh5lrjdzqf89sb";
|
2009-08-28 01:32:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# gimp, gui is still not working (TODO)
|
2013-11-10 00:32:17 +01:00
|
|
|
buildInputs = [ makeWrapper openssl pkgconfig ];
|
2009-08-28 01:32:13 +02:00
|
|
|
|
|
|
|
configureFlags = ["--enable-static-genppd"];
|
2012-06-09 22:10:35 +02:00
|
|
|
NIX_CFLAGS_COMPILE="-include stdio.h";
|
2010-07-28 13:55:54 +02:00
|
|
|
|
2009-08-28 01:32:13 +02:00
|
|
|
#preConfigure = ''
|
|
|
|
# configureFlags="--with-cups=$out/usr-cups $configureFlags"
|
|
|
|
#'';
|
2010-07-28 13:55:54 +02:00
|
|
|
|
2009-08-28 01:32:13 +02:00
|
|
|
/*
|
|
|
|
is this recommended? without it this warning is printed:
|
|
|
|
|
|
|
|
***WARNING: Use of --disable-static-genppd or --disable-static
|
|
|
|
when building CUPS is very dangerous. The build may
|
|
|
|
fail when building the PPD files, or may *SILENTLY*
|
|
|
|
build incorrect PPD files or cause other problems.
|
|
|
|
Please review the README and release notes carefully!
|
|
|
|
*/
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
eval "make install $installArgs"
|
2013-11-10 00:32:17 +01:00
|
|
|
mkdir -p $out/lib/cups
|
|
|
|
ln -s $out/filter $out/lib/cups/
|
|
|
|
wrapProgram $out/filter/rastertogutenprint.5.2 --prefix LD_LIBRARY_PATH : $out/lib
|
2013-11-10 16:27:02 +01:00
|
|
|
wrapProgram $out/sbin/cups-genppd.5.2 --prefix LD_LIBRARY_PATH : $out/lib
|
2009-08-28 01:32:13 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Ghostscript and cups printer drivers";
|
|
|
|
homepage = http://sourceforge.net/projects/gimp-print/;
|
|
|
|
license = "GPL";
|
|
|
|
};
|
|
|
|
|
2010-07-28 13:55:54 +02:00
|
|
|
mergeAttrBy = { installArgs = stdenv.lib.concat; };
|
2009-08-28 01:32:13 +02:00
|
|
|
|
|
|
|
# most interpreters aren't tested yet.. (see python for example how to do it)
|
|
|
|
flags =
|
|
|
|
wwf {
|
|
|
|
name = "gimp2";
|
|
|
|
enable = {
|
|
|
|
buildInputs = [gimp gimp.gtk];
|
2012-06-09 22:10:35 +02:00
|
|
|
installArgs = [ "gimp2_plug_indir=$out/${gimp.name}-plugins" ];
|
2009-08-28 01:32:13 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
// {
|
|
|
|
cups = {
|
|
|
|
set = {
|
|
|
|
buildInputs = [cups libtiff libpng ];
|
|
|
|
installArgs = [ "cups_conf_datadir=$out cups_conf_serverbin=$out cups_conf_serverroot=$out"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
cfg = {
|
|
|
|
gimp2Support = true;
|
|
|
|
cupsSupport = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|