about summary refs log tree commit diff
path: root/pkgs/applications/graphics/gimp
diff options
context:
space:
mode:
authorFabián Heredia Montiel <fabianhjr@protonmail.com>2022-11-19 10:52:05 -0600
committerFabián Heredia Montiel <fabianhjr@protonmail.com>2022-11-29 19:38:59 -0600
commitd3b71d535cb65381881df40e9d71c00644ba957a (patch)
tree5d879ca582420f09c9c865e5e6b9854c4d97d400 /pkgs/applications/graphics/gimp
parent35f080bb1883da1d2c0c489b262c9b0d7918f8cb (diff)
gimp: condition python2 behind new withPython argument
Diffstat (limited to 'pkgs/applications/graphics/gimp')
-rw-r--r--pkgs/applications/graphics/gimp/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix
index ee733a0b1b0c0..4423ca61ff177 100644
--- a/pkgs/applications/graphics/gimp/default.nix
+++ b/pkgs/applications/graphics/gimp/default.nix
@@ -30,7 +30,6 @@
 , ghostscript
 , aalib
 , shared-mime-info
-, python2
 , libexif
 , gettext
 , makeWrapper
@@ -48,6 +47,8 @@
 , AppKit
 , Cocoa
 , gtk-mac-integration-gtk2
+, withPython ? false
+, python2 ? null
 }:
 
 let
@@ -116,9 +117,6 @@ in stdenv.mkDerivation rec {
     shared-mime-info
     libwebp
     libheif
-    python
-    # Duplicated here because python.withPackages does not expose the dev output with pkg-config files
-    python2.pkgs.pygtk
     libexif
     xorg.libXpm
     glib-networking
@@ -130,6 +128,10 @@ in stdenv.mkDerivation rec {
     gtk-mac-integration-gtk2
   ] ++ lib.optionals stdenv.isLinux [
     libgudev
+  ] ++ lib.optionals withPython [
+    python
+    # Duplicated here because python.withPackages does not expose the dev output with pkg-config files
+    python2.pkgs.pygtk
   ];
 
   # needed by gimp-2.0.pc
@@ -144,6 +146,8 @@ in stdenv.mkDerivation rec {
     "--with-icc-directory=/run/current-system/sw/share/color/icc"
     # fix libdir in pc files (${exec_prefix} needs to be passed verbatim)
     "--libdir=\${exec_prefix}/lib"
+  ] ++ lib.optionals (!withPython) [
+    "--disable-python" # depends on Python2 which was EOLed on 2020-01-01
   ];
 
   enableParallelBuilding = true;