From 15dd4479cfd2ddda93e74eba470bd34df098b34f Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Wed, 10 Jul 2019 22:36:57 +0100 Subject: [PATCH 1/3] gimpPlugins.gimplensfun: 0.2.4 -> unstable-2018-10-21 Fixes broken build with exiv2-0.27.1 by using gexiv2 instead --- pkgs/applications/graphics/gimp/plugins/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 1787b1d9e7f..008bfdf881e 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -157,17 +157,17 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; { ufraw = pkgs.ufraw.gimpPlugin; gimplensfun = pluginDerivation rec { - version = "0.2.4"; + version = "unstable-2018-10-21"; name = "gimplensfun-${version}"; src = fetchFromGitHub { owner = "seebk"; repo = "GIMP-Lensfun"; - rev = version; - sha256 = "0zlmp9v732qmzj083mnk5z421s57mnckmpjhiw890wmmwzj2lhxz"; + rev = "1c5a5c1534b5faf098b7441f8840d22835592f17"; + sha256 = "1jj3n7spkjc63aipwdqsvq9gi07w13bb1v8iqzvxwzld2kxa3c8w"; }; - buildInputs = with pkgs; [ lensfun exiv2 ]; + buildInputs = with pkgs; [ lensfun gexiv2 ]; installPhase = " installPlugins gimp-lensfun From debf1db8f834beb7192a32c642af884a95922299 Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Sat, 13 Jul 2019 23:05:23 +0100 Subject: [PATCH 2/3] ufraw: 0.22 -> unstable-2019-06-12 The original ufraw repo is no longer maintained, so change to a new upstream that's collecting patches, including one we need to fix the build against more recent versions of exiv2. --- pkgs/applications/graphics/ufraw/default.nix | 69 +++++++++++++++----- 1 file changed, 51 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/graphics/ufraw/default.nix b/pkgs/applications/graphics/ufraw/default.nix index 50cd9485a3e..a07b7bb7ab4 100644 --- a/pkgs/applications/graphics/ufraw/default.nix +++ b/pkgs/applications/graphics/ufraw/default.nix @@ -1,38 +1,71 @@ -{ fetchurl, stdenv, pkgconfig, gtk2, gettext, bzip2, zlib -, withGimpPlugin ? true, gimp ? null -, libjpeg, libtiff, cfitsio, exiv2, lcms2, gtkimageview, lensfun }: +{ stdenv +, fetchFromGitHub + +, autoconf +, automake +, autoreconfHook +, bzip2 +, cfitsio +, exiv2 +, gettext +, gimp ? null +, gtk2 +, gtkimageview +, lcms2 +, lensfun +, libjpeg +, libtiff +, perl +, pkgconfig +, zlib + +, withGimpPlugin ? true +}: assert withGimpPlugin -> gimp != null; stdenv.mkDerivation rec { - name = "ufraw-0.22"; + pname = "ufraw"; + version = "unstable-2019-06-12"; - src = fetchurl { - # XXX: These guys appear to mutate uploaded tarballs! - url = "mirror://sourceforge/ufraw/${name}.tar.gz"; - sha256 = "0pm216pg0vr44gwz9vcvq3fsf8r5iayljhf5nis2mnw7wn6d5azp"; + # The original ufraw repo is unmaintained and broken; + # this is a fork that collects patches + src = fetchFromGitHub { + owner = "sergiomb2"; + repo = "ufraw"; + rev = "c65b4237dcb430fb274e4778afaf5df9a18e04e6"; + sha256 = "02icn67bsinvgliy62qa6v7gmwgp2sh15jvm8iiz3c7g1h74f0b7"; }; outputs = [ "out" ] ++ stdenv.lib.optional withGimpPlugin "gimpPlugin"; - nativeBuildInputs = [ pkgconfig gettext ]; + nativeBuildInputs = [ autoconf automake autoreconfHook gettext perl pkgconfig ]; + buildInputs = [ - gtk2 gtkimageview bzip2 zlib - libjpeg libtiff cfitsio exiv2 lcms2 lensfun + bzip2 + cfitsio + exiv2 + gtk2 + gtkimageview + lcms2 + lensfun + libjpeg + libtiff + zlib ] ++ stdenv.lib.optional withGimpPlugin gimp; configureFlags = [ - "--enable-extras" - "--enable-dst-correction" "--enable-contrast" + "--enable-dst-correction" + "--enable-extras" ] ++ stdenv.lib.optional withGimpPlugin "--with-gimp"; postInstall = stdenv.lib.optionalString withGimpPlugin '' moveToOutput "lib/gimp" "$gimpPlugin" ''; - meta = { - homepage = http://ufraw.sourceforge.net/; + meta = with stdenv.lib; { + homepage = https://github.com/sergiomb2/ufraw; description = "Utility to read and manipulate raw images from digital cameras"; @@ -46,9 +79,9 @@ stdenv.mkDerivation rec { the camera's tone curves. ''; - license = stdenv.lib.licenses.gpl2Plus; + license = licenses.gpl2Plus; - maintainers = [ ]; - platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # needs GTK+ + maintainers = with maintainers; [ gloaming ]; + platforms = with platforms; all; }; } From 38b057f6ca65bb2631d73a9fc173b53c3affe90b Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Thu, 15 Aug 2019 22:26:47 +0100 Subject: [PATCH 3/3] ufraw: Remove --enable-extras Don't build the 'dcraw' and 'nikon-curve' binaries, as per ufraw's README: "Do not package the executables generated by by --enable-extras. These extras are there for testing the code during development. They are of no interest to end user. Specifically, if you want to package dcraw, you should use Dave's original code and not UFRaw's modified code." --- pkgs/applications/graphics/ufraw/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/graphics/ufraw/default.nix b/pkgs/applications/graphics/ufraw/default.nix index a07b7bb7ab4..39b4640dc43 100644 --- a/pkgs/applications/graphics/ufraw/default.nix +++ b/pkgs/applications/graphics/ufraw/default.nix @@ -57,7 +57,6 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-contrast" "--enable-dst-correction" - "--enable-extras" ] ++ stdenv.lib.optional withGimpPlugin "--with-gimp"; postInstall = stdenv.lib.optionalString withGimpPlugin ''