mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
gimp: Hardcode interpreter paths
The E (extension) line in pygimp.interp prints the following warnings: GIMP-Warning: Bad interpreter referenced in interpreter file /nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/lib/gimp/2.0/interpreters/pygimp.interp: python2 GIMP-Warning: Bad binary format string in interpreter file /nix/store/5c91dah385gn70blsn6i5rzncqj3ks0y-gimp-with-plugins-2.10.18/lib/gimp/2.0/interpreters/pygimp.interp This means that the py extension will not be registered when python2 is not in PATH. To prevent this, let’s hardcode the absolute python2 path. https://github.com/NixOS/nixpkgs/issues/60937#issuecomment-653652093 Closes: https://github.com/NixOS/nixpkgs/issues/60937
This commit is contained in:
parent
3b701aa4b6
commit
64ec4fd65d
@ -2,6 +2,7 @@
|
||||
, lib
|
||||
, fetchurl
|
||||
, substituteAll
|
||||
, autoreconfHook
|
||||
, pkgconfig
|
||||
, intltool
|
||||
, babl
|
||||
@ -60,7 +61,21 @@ in stdenv.mkDerivation rec {
|
||||
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 = [
|
||||
autoreconfHook # hardcode-plugin-interpreters.patch changes Makefile.am
|
||||
pkgconfig
|
||||
intltool
|
||||
gettext
|
||||
@ -124,15 +139,6 @@ in stdenv.mkDerivation rec {
|
||||
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 = ''
|
||||
wrapProgram $out/bin/gimp-${lib.versions.majorMinor version} \
|
||||
--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…
Reference in New Issue
Block a user