Merge pull request #92228 from jtojnar/gimp-interp
This commit is contained in:
commit
9925e909e4
@ -2,6 +2,7 @@
|
|||||||
, lib
|
, lib
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, substituteAll
|
, substituteAll
|
||||||
|
, autoreconfHook
|
||||||
, pkgconfig
|
, pkgconfig
|
||||||
, intltool
|
, intltool
|
||||||
, babl
|
, babl
|
||||||
@ -28,9 +29,10 @@
|
|||||||
, ghostscript
|
, ghostscript
|
||||||
, aalib
|
, aalib
|
||||||
, shared-mime-info
|
, shared-mime-info
|
||||||
, python2Packages
|
, python2
|
||||||
, libexif
|
, libexif
|
||||||
, gettext
|
, gettext
|
||||||
|
, makeWrapper
|
||||||
, xorg
|
, xorg
|
||||||
, glib-networking
|
, glib-networking
|
||||||
, libmypaint
|
, libmypaint
|
||||||
@ -47,7 +49,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (python2Packages) pygtk wrapPython python;
|
python = python2.withPackages (pp: [ pp.pygtk ]);
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "gimp";
|
pname = "gimp";
|
||||||
version = "2.10.20";
|
version = "2.10.20";
|
||||||
@ -59,11 +61,25 @@ in stdenv.mkDerivation rec {
|
|||||||
sha256 = "4S+fh0saAHxCd7YKqB4LZzML5+YVPldJ6tg5uQL8ezw=";
|
sha256 = "4S+fh0saAHxCd7YKqB4LZzML5+YVPldJ6tg5uQL8ezw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# to remove compiler from the runtime closure, reference was retained via
|
||||||
|
# gimp --version --verbose output
|
||||||
|
(substituteAll {
|
||||||
|
src = ./remove-cc-reference.patch;
|
||||||
|
cc_version = stdenv.cc.cc.name;
|
||||||
|
})
|
||||||
|
|
||||||
|
# Use absolute paths instead of relying on PATH
|
||||||
|
# to make sure plug-ins are loaded by the correct interpreter.
|
||||||
|
./hardcode-plugin-interpreters.patch
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
autoreconfHook # hardcode-plugin-interpreters.patch changes Makefile.am
|
||||||
pkgconfig
|
pkgconfig
|
||||||
intltool
|
intltool
|
||||||
gettext
|
gettext
|
||||||
wrapPython
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -97,7 +113,6 @@ in stdenv.mkDerivation rec {
|
|||||||
libwebp
|
libwebp
|
||||||
libheif
|
libheif
|
||||||
python
|
python
|
||||||
pygtk
|
|
||||||
libexif
|
libexif
|
||||||
xorg.libXpm
|
xorg.libXpm
|
||||||
glib-networking
|
glib-networking
|
||||||
@ -116,8 +131,6 @@ in stdenv.mkDerivation rec {
|
|||||||
gegl
|
gegl
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonPath = [ pygtk ];
|
|
||||||
|
|
||||||
# Check if librsvg was built with --disable-pixbuf-loader.
|
# Check if librsvg was built with --disable-pixbuf-loader.
|
||||||
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}";
|
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}";
|
||||||
|
|
||||||
@ -126,19 +139,8 @@ in stdenv.mkDerivation rec {
|
|||||||
export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES"
|
export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = [
|
|
||||||
# to remove compiler from the runtime closure, reference was retained via
|
|
||||||
# gimp --version --verbose output
|
|
||||||
(substituteAll {
|
|
||||||
src = ./remove-cc-reference.patch;
|
|
||||||
cc_version = stdenv.cc.cc.name;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapPythonProgramsIn $out/lib/gimp/${passthru.majorVersion}/plug-ins/
|
|
||||||
wrapProgram $out/bin/gimp-${lib.versions.majorMinor version} \
|
wrapProgram $out/bin/gimp-${lib.versions.majorMinor version} \
|
||||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
|
||||||
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
--- a/plug-ins/pygimp/Makefile.am
|
||||||
|
+++ b/plug-ins/pygimp/Makefile.am
|
||||||
|
@@ -157,7 +157,7 @@ install-interp-file:
|
||||||
|
echo 'python=$(PYBIN_PATH)' > '$(DESTDIR)$(pyinterpfile)'
|
||||||
|
echo 'python2=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)'
|
||||||
|
echo '/usr/bin/python=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)'
|
||||||
|
- echo ":Python:E::py::`basename $(PYTHON)`:" >> '$(DESTDIR)$(pyinterpfile)'
|
||||||
|
+ echo ":Python:E::py::$(PYTHON):" >> '$(DESTDIR)$(pyinterpfile)'
|
||||||
|
|
||||||
|
install-data-local: install-env-file install-interp-file
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user