summary refs log tree commit diff
path: root/pkgs/applications/graphics/photivo/default.nix
blob: 09b5bd378397f57d61d5c3c71db0b26430b61356 (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
{ stdenv, fetchhg, fetchpatch, cmake, qt4, fftw, graphicsmagick_q16,
  lcms2, lensfun, pkgconfig, libjpeg, exiv2, liblqr1 }:

stdenv.mkDerivation {
  name = "photivo-2014-01-25";

  src = fetchhg {
    url = "http://code.google.com/p/photivo/";
    rev = "d687864489da";
    sha256 = "0f6y18k7db2ci6xn664zcwm1g1k04sdv7gg1yd5jk41bndjb7z8h";
  };

  patches = [
    # Patch fixing build with lensfun >= 0.3, taken from
    # https://www.linuxquestions.org/questions/slackware-14/photivo-4175530230/#post5296578
    (fetchpatch {
      url = "https://www.linuxquestions.org/questions/attachment.php?attachmentid=17287&d=1420577220";
      name = "lensfun-0.3.patch";
      sha256 = "0ys45x4r4bjjlx0zpd5d56rgjz7k8gxili4r4k8zx3zfka4a3zwv";
    })
    ./gcc6.patch
  ];

  postPatch = '' # kinda icky
    sed -e '/("@INSTALL@")/d' \
        -e s,@INSTALL@,$out/share/photivo, \
        -i Sources/ptSettings.cpp
    sed '1i#include <math.h>' -i Sources/filters/ptFilter_StdCurve.cpp
  '';

  nativeBuildInputs = [ cmake pkgconfig ];

  buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ];

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    platforms = platforms.linux;
    license = licenses.gpl3;
    broken = true; # exiv2 0.27.1 FTBFS
  };
}