summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/graphics/ufraw/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics/ufraw/default.nix')
-rw-r--r--pkgs/applications/graphics/ufraw/default.nix26
1 files changed, 21 insertions, 5 deletions
diff --git a/pkgs/applications/graphics/ufraw/default.nix b/pkgs/applications/graphics/ufraw/default.nix
index fc8e7a62c2ba..50cd9485a3e8 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/;
@@ -33,6 +49,6 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ ];
- platforms = stdenv.lib.platforms.gnu; # needs GTK+
+ platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # needs GTK+
};
}