about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/graphics/nufraw/default.nix
blob: f6031bea069d9967fbf68d9147b90b92b673f7fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{ stdenv
, fetchurl
, lib

, autoreconfHook
, bzip2
, cfitsio
, exiv2
, gettext
, gtk2
, gtkimageview
, lcms2
, lensfun
, libjpeg
, libtiff
, perl
, pkg-config
, zlib

, addThumbnailer ? false
}:

stdenv.mkDerivation rec {
  pname = "nufraw";
  version = "0.43-3";

  src = fetchurl {
    url = "mirror://sourceforge/nufraw/nufraw-${version}.tar.gz";
    sha256 = "0b63qvw9r8kaqw36bk3a9zwxc41h8fr6498indkw4glrj0awqz9c";
  };

  nativeBuildInputs = [ autoreconfHook gettext perl pkg-config ];

  buildInputs = [
    bzip2
    cfitsio
    exiv2
    gtk2
    gtkimageview
    lcms2
    lensfun
    libjpeg
    libtiff
    zlib
  ];

  configureFlags = [
    "--enable-contrast"
    "--enable-dst-correction"
  ];

  postInstall = lib.optionalString addThumbnailer ''
    mkdir -p $out/share/thumbnailers
    substituteAll ${./nufraw.thumbnailer} $out/share/thumbnailers/${pname}.thumbnailer
  '';

  # Fixes an upstream issue where headers with templates were included in an extern-C scope
  # which caused the build to fail
  patches = [ ./move-extern-c.patch ];

  meta = with lib; {
    homepage = "https://nufraw.sourceforge.io/";
    description = "Utility to read and manipulate raw images from digital cameras";
    longDescription =
      ''
        A new version of the popular raw digital images manipulator ufraw.
        Forks from the version 0.23 of ufraw (that's why the first nufraw version is the 0.24).
        Nufraw offers the same features (gimp plugin, batch, ecc) and the same quality of
        ufraw in a brand new improved user interface.
      '';
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ asbachb ];
    platforms   = [ "x86_64-linux" "i686-linux" ];
  };
}