···
# this package was called gimp-print in the past
{ stdenv, lib, fetchurl, pkgconfig
4
-
, gimp2Support ? true, gimp
4
+
, gimp2Support ? false, gimp
, cupsSupport ? true, cups, libusb, perl
···
"--disable-static-genppd" # should be harmless on NixOS
26
+
# FIXME: hacky because we modify generated configure, but I haven't found a better way.
27
+
# makeFlags doesn't change this everywhere (e.g. in cups-genppdupdate).
28
+
preConfigure = lib.optionalString cupsSupport ''
30
+
-e "s,cups_conf_datadir=.*,cups_conf_datadir=\"$out/share/cups\",g" \
31
+
-e "s,cups_conf_serverbin=.*,cups_conf_serverbin=\"$out/lib/cups\",g" \
32
+
-e "s,cups_conf_serverroot=.*,cups_conf_serverroot=\"$out/etc/cups\",g" \
34
+
'' + lib.optionalString gimp2Support ''
36
+
-e "s,gimp2_plug_indir=.*,gimp2_plug_indir=\"$out/lib/gimp/${gimp.majorVersion}\",g" \
enableParallelBuilding = true;
# Testing is very, very long.
32
-
lib.optionals cupsSupport [ "cups_conf_datadir=$(out)/share/cups" "cups_conf_serverbin=$(out)/lib/cups" "cups_conf_serverroot=$(out)/etc/cups" ]
33
-
++ lib.optionals gimp2Support [ "gimp2_plug_indir=$(out)/${gimp.name}-plugins" ];
meta = with stdenv.lib; {
description = "Ghostscript and cups printer drivers";