summary refs log tree commit diff
path: root/pkgs/applications/misc/cataract/build.nix
blob: 1c33a92987c153396fb7faddc8f3770aedcc9c98 (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
{ stdenv
, fetchgit
, autoreconfHook
, glib
, pkgconfig
, libxml2
, exiv2
, imagemagick
, version
, sha256
, rev }:

stdenv.mkDerivation {
  inherit version;
  pname = "cataract";

  src = fetchgit {
    url = "git://git.bzatek.net/cataract";
    inherit sha256 rev;
  };

  nativeBuildInputs = [ autoreconfHook pkgconfig ];
  buildInputs = [ glib libxml2 exiv2 imagemagick ];

  prePatch = ''
    sed -i 's|#include <exiv2/exif.hpp>|#include <exiv2/exiv2.hpp>|' src/jpeg-utils.cpp
  '';

  installPhase = ''
    mkdir $out/{bin,share} -p
    cp src/cgg{,-dirgen} $out/bin/
  '';

  meta = with stdenv.lib; {
    homepage = "http://cgg.bzatek.net/";
    description = "A simple static web photo gallery, designed to be clean and easily usable";
    license = licenses.gpl2;
    maintainers = [ maintainers.matthiasbeyer ];
    platforms = with platforms; linux ++ darwin;
  };
}