summary refs log tree commit diff
path: root/pkgs/applications/graphics/ufraw/default.nix
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-04-29 02:59:26 +0200
committerJan Tojnar <jtojnar@gmail.com>2018-04-29 08:39:06 +0200
commit63a234c4a720f3457801043276e1884e451d3b85 (patch)
treef32eae23b4cbc9a825a6c7eaf236a8e8c420772b /pkgs/applications/graphics/ufraw/default.nix
parent882682827a0c23537951d3ad0241df11b3dbb36e (diff)
downloadnixpkgs-63a234c4a720f3457801043276e1884e451d3b85.tar
nixpkgs-63a234c4a720f3457801043276e1884e451d3b85.tar.gz
nixpkgs-63a234c4a720f3457801043276e1884e451d3b85.tar.bz2
nixpkgs-63a234c4a720f3457801043276e1884e451d3b85.tar.lz
nixpkgs-63a234c4a720f3457801043276e1884e451d3b85.tar.xz
nixpkgs-63a234c4a720f3457801043276e1884e451d3b85.tar.zst
nixpkgs-63a234c4a720f3457801043276e1884e451d3b85.zip
ufraw: build gimp plugin
Diffstat (limited to 'pkgs/applications/graphics/ufraw/default.nix')
-rw-r--r--pkgs/applications/graphics/ufraw/default.nix24
1 files changed, 20 insertions, 4 deletions
diff --git a/pkgs/applications/graphics/ufraw/default.nix b/pkgs/applications/graphics/ufraw/default.nix
index fc8e7a62c2b..cb1c37aefeb 100644
--- a/pkgs/applications/graphics/ufraw/default.nix
+++ b/pkgs/applications/graphics/ufraw/default.nix
@@ -1,6 +1,9 @@
 { fetchurl, stdenv, pkgconfig, gtk2, gettext, bzip2, zlib
+, withGimpPlugin ? true, gimp ? null
 , libjpeg, libtiff, cfitsio, exiv2, lcms2, gtkimageview, lensfun }:
 
+assert withGimpPlugin -> gimp != null;
+
 stdenv.mkDerivation rec {
   name = "ufraw-0.22";
 
@@ -10,10 +13,23 @@ stdenv.mkDerivation rec {
     sha256 = "0pm216pg0vr44gwz9vcvq3fsf8r5iayljhf5nis2mnw7wn6d5azp";
   };
 
-  buildInputs =
-    [ pkgconfig gtk2 gtkimageview gettext bzip2 zlib
-      libjpeg libtiff cfitsio exiv2 lcms2 lensfun
-    ];
+  outputs = [ "out" ] ++ stdenv.lib.optional withGimpPlugin "gimpPlugin";
+
+  nativeBuildInputs = [ pkgconfig gettext ];
+  buildInputs = [
+    gtk2 gtkimageview bzip2 zlib
+    libjpeg libtiff cfitsio exiv2 lcms2 lensfun
+  ] ++ stdenv.lib.optional withGimpPlugin gimp;
+
+  configureFlags = [
+    "--enable-extras"
+    "--enable-dst-correction"
+    "--enable-contrast"
+  ] ++ stdenv.lib.optional withGimpPlugin "--with-gimp";
+
+  postInstall = stdenv.lib.optionalString withGimpPlugin ''
+    moveToOutput "lib/gimp" "$gimpPlugin"
+  '';
 
   meta = {
     homepage = http://ufraw.sourceforge.net/;