From 63a234c4a720f3457801043276e1884e451d3b85 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 29 Apr 2018 02:59:26 +0200 Subject: ufraw: build gimp plugin --- .../applications/graphics/gimp/plugins/default.nix | 27 +--------------------- pkgs/applications/graphics/ufraw/default.nix | 24 +++++++++++++++---- 2 files changed, 21 insertions(+), 30 deletions(-) (limited to 'pkgs/applications/graphics') diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 444fb37ae338..86e3c4e20c54 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -179,32 +179,7 @@ rec { installPhase = "installPlugins gmic_gimp"; }; - # this is more than a gimp plugin ! - # either load the raw image with gimp (and the import dialog will popup) - # or use the binary - ufraw = pluginDerivation rec { - name = "ufraw-0.19.2"; - buildInputs = with pkgs; [ gtkimageview lcms ]; - # --enable-mime - install mime files, see README for more information - # --enable-extras - build extra (dcraw, nikon-curve) executables - # --enable-dst-correction - enable DST correction for file timestamps. - # --enable-contrast - enable the contrast setting option. - # --enable-interp-none: enable 'None' interpolation (mostly for debugging). - # --with-lensfun: use the lensfun library - experimental feature, read this before using it. - # --with-prefix=PREFIX - use also PREFIX as an input prefix for the build - # --with-dosprefix=PREFIX - PREFIX in the the prefix in dos format (needed only for ms-window - configureFlags = "--enable-extras --enable-dst-correction --enable-contrast"; - - src = fetchurl { - url = "mirror://sourceforge/ufraw/${name}.tar.gz"; - sha256 = "1lxba7pb3vcsq94dwapg9bk9mb3ww6r3pvvcyb0ah5gh2sgzxgkk"; - }; - installPhase = " - installPlugins ufraw-gimp - mkdir -p $out/bin - cp ufraw $out/bin - "; - }; + ufraw = pkgs.ufraw.gimpPlugin; gimplensfun = pluginDerivation rec { version = "0.2.4"; diff --git a/pkgs/applications/graphics/ufraw/default.nix b/pkgs/applications/graphics/ufraw/default.nix index fc8e7a62c2ba..cb1c37aefebf 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/; -- cgit 1.4.1