1{ stdenv, fetchurl, cmake }:
2
3stdenv.mkDerivation rec {
4 name = "ctpp2";
5 version = "2.8.3";
6
7 src = fetchurl {
8 url = "http://ctpp.havoc.ru/download/ctpp2-${version}.tar.gz";
9 sha256 = "1z22zfw9lb86z4hcan9hlvji49c9b7vznh7gjm95gnvsh43zsgx8";
10 };
11
12 buildInputs = [ cmake ];
13
14 patchPhase = ''
15 # include <unistd.h> to fix undefined getcwd
16 sed -ie 's/<stdlib.h>/<stdlib.h>\n#include <unistd.h>/' src/CTPP2FileSourceLoader.cpp
17 '';
18
19 meta = {
20 description = "A high performance templating engine";
21 homepage = http://ctpp.havoc.ru;
22 maintainers = with stdenv.lib.maintainers; [ robbinch ];
23 platforms = with stdenv.lib.platforms; linux;
24 };
25}