summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/graphics/sane/xsane.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/applications/graphics/sane/xsane.nix b/pkgs/applications/graphics/sane/xsane.nix
index de8d4c33652..32b39c0160d 100644
--- a/pkgs/applications/graphics/sane/xsane.nix
+++ b/pkgs/applications/graphics/sane/xsane.nix
@@ -1,4 +1,9 @@
-{ stdenv, fetchurl, saneBackends, saneFrontends, libX11, gtk, pkgconfig, libpng, libusb ? null }:
+{ stdenv, fetchurl, saneBackends, saneFrontends, libX11, gtk, pkgconfig, libpng
+, libusb ? null
+, gimpSupport ? false, gimp_2_8 ? null
+}:
+
+assert gimpSupport -> gimp_2_8 != null;
 
 stdenv.mkDerivation rec {
   name = "xsane-0.998";
@@ -12,8 +17,9 @@ stdenv.mkDerivation rec {
     sed -e '/SANE_CAP_ALWAYS_SETTABLE/d' -i src/xsane-back-gtk.c
   '';
 
-  buildInputs = [libpng saneBackends saneFrontends libX11 gtk pkgconfig ] ++
-	(if libusb != null then [libusb] else []);
+  buildInputs = [libpng saneBackends saneFrontends libX11 gtk pkgconfig ]
+    ++ (if libusb != null then [libusb] else [])
+    ++ stdenv.lib.optional gimpSupport gimp_2_8;
 
   meta = {
     homepage = http://www.sane-project.org/;