2016-09-11 23:24:51 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, intltool, babl, gegl, gtk2, glib, gdk_pixbuf
|
2013-06-29 16:07:15 +02:00
|
|
|
, pango, cairo, freetype, fontconfig, lcms, libpng, libjpeg, poppler, libtiff
|
2012-06-04 19:38:47 +02:00
|
|
|
, webkit, libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, jasper
|
2017-12-21 23:48:49 +01:00
|
|
|
, python2Packages, libexif, gettext, xorg
|
2016-11-22 09:14:00 +01:00
|
|
|
, AppKit, Cocoa, gtk-mac-integration }:
|
2012-06-04 19:38:47 +02:00
|
|
|
|
2016-09-25 23:19:01 +02:00
|
|
|
let
|
2016-10-19 11:10:36 +02:00
|
|
|
inherit (python2Packages) pygtk wrapPython python;
|
2016-09-25 23:19:01 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
2016-04-26 14:26:45 +02:00
|
|
|
name = "gimp-${version}";
|
2017-05-13 21:08:43 +02:00
|
|
|
version = "2.8.22";
|
2013-06-28 23:04:43 +02:00
|
|
|
|
2016-02-25 22:24:45 +01:00
|
|
|
# This declarations for `gimp-with-plugins` wrapper,
|
|
|
|
# (used for determining $out/lib/gimp/${majorVersion}/ paths)
|
|
|
|
majorVersion = "2.0";
|
|
|
|
targetPluginDir = "$out/lib/gimp/${majorVersion}/plug-ins";
|
|
|
|
targetScriptDir = "$out/lib/gimp/${majorVersion}/scripts";
|
|
|
|
|
2012-06-04 19:38:47 +02:00
|
|
|
src = fetchurl {
|
2014-05-22 11:48:42 +02:00
|
|
|
url = "http://download.gimp.org/pub/gimp/v2.8/${name}.tar.bz2";
|
2017-05-13 21:08:43 +02:00
|
|
|
sha256 = "12k3lp938qdc9cqj29scg55f3bb8iav2fysd29w0s49bqmfa71wi";
|
2012-06-04 19:38:47 +02:00
|
|
|
};
|
2013-06-28 23:04:43 +02:00
|
|
|
|
|
|
|
buildInputs =
|
2016-09-11 23:24:51 +02:00
|
|
|
[ pkgconfig intltool babl gegl gtk2 glib gdk_pixbuf pango cairo
|
2013-06-29 16:07:15 +02:00
|
|
|
freetype fontconfig lcms libpng libjpeg poppler libtiff webkit
|
2012-06-04 19:38:47 +02:00
|
|
|
libmng librsvg libwmf zlib libzip ghostscript aalib jasper
|
2017-12-21 23:48:49 +01:00
|
|
|
python pygtk libexif gettext xorg.libXpm
|
2014-01-31 07:05:53 +01:00
|
|
|
wrapPython
|
2016-11-22 09:14:00 +01:00
|
|
|
]
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Cocoa gtk-mac-integration ];
|
2012-06-04 19:38:47 +02:00
|
|
|
|
2014-01-31 07:05:53 +01:00
|
|
|
pythonPath = [ pygtk ];
|
|
|
|
|
2016-08-29 01:41:17 +02:00
|
|
|
postFixup = ''
|
|
|
|
wrapPythonProgramsIn $out/lib/gimp/2.0/plug-ins/
|
|
|
|
wrapProgram $out/bin/gimp \
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH" \
|
|
|
|
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
|
|
|
'';
|
2014-01-31 07:05:53 +01:00
|
|
|
|
2016-09-11 23:24:51 +02:00
|
|
|
passthru = { gtk = gtk2; }; # probably its a good idea to use the same gtk in plugins ?
|
2012-06-04 19:38:47 +02:00
|
|
|
|
|
|
|
#configureFlags = [ "--disable-print" ];
|
|
|
|
|
2016-01-17 01:28:58 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2012-06-04 19:38:47 +02:00
|
|
|
# "screenshot" needs this.
|
2016-01-24 08:29:49 +01:00
|
|
|
NIX_LDFLAGS = "-rpath ${xorg.libX11.out}/lib"
|
2015-04-01 22:44:17 +02:00
|
|
|
+ stdenv.lib.optionalString stdenv.isDarwin " -lintl";
|
2012-06-04 19:38:47 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The GNU Image Manipulation Program";
|
2017-08-02 23:50:51 +02:00
|
|
|
homepage = https://www.gimp.org/;
|
2014-11-06 01:44:33 +01:00
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
2016-11-22 09:14:00 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2012-06-04 19:38:47 +02:00
|
|
|
};
|
|
|
|
}
|