about summary refs log tree commit diff
path: root/pkgs/applications/graphics/gimp
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics/gimp')
-rw-r--r--pkgs/applications/graphics/gimp/default.nix11
-rw-r--r--pkgs/applications/graphics/gimp/remove-cc-reference.patch13
2 files changed, 23 insertions, 1 deletions
diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix
index 15033b8b2b09..729b58ee89e6 100644
--- a/pkgs/applications/graphics/gimp/default.nix
+++ b/pkgs/applications/graphics/gimp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, intltool, babl, gegl, gtk2, glib, gdk_pixbuf, isocodes
+{ stdenv, fetchurl, substituteAll, pkgconfig, intltool, babl, gegl, gtk2, glib, gdk_pixbuf, isocodes
 , pango, cairo, freetype, fontconfig, lcms, libpng, libjpeg, poppler, poppler_data, libtiff
 , libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, shared-mime-info
 , python2Packages, libexif, gettext, xorg, glib-networking, libmypaint, gexiv2
@@ -36,6 +36,15 @@ 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 = ''
     wrapPythonProgramsIn $out/lib/gimp/${passthru.majorVersion}/plug-ins/
     wrapProgram $out/bin/gimp-${stdenv.lib.versions.majorMinor version} \
diff --git a/pkgs/applications/graphics/gimp/remove-cc-reference.patch b/pkgs/applications/graphics/gimp/remove-cc-reference.patch
new file mode 100644
index 000000000000..0d6a87000ccd
--- /dev/null
+++ b/pkgs/applications/graphics/gimp/remove-cc-reference.patch
@@ -0,0 +1,13 @@
+diff --git a/app/gimp-version.c b/app/gimp-version.c
+index 12605c6..a9083da 100644
+--- a/app/gimp-version.c
++++ b/app/gimp-version.c
+@@ -203,7 +203,7 @@ gimp_version (gboolean be_verbose,
+       lib_versions = gimp_library_versions (localized);
+       verbose_info = g_strdup_printf ("git-describe: %s\n"
+                                       "C compiler:\n%s\n%s",
+-                                      GIMP_GIT_VERSION, CC_VERSION,
++                                      GIMP_GIT_VERSION, "@cc_version@",
+                                       lib_versions);
+       g_free (lib_versions);
+