nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "ctpp2";
5 version = "2.8.3";
6
7 src = fetchurl {
8 url = "http://ctpp.havoc.ru/download/${pname}-${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 doCheck = false; # fails
20
21 meta = with stdenv.lib; {
22 description = "A high performance templating engine";
23 homepage = "http://ctpp.havoc.ru";
24 maintainers = [ maintainers.robbinch ];
25 platforms = platforms.linux;
26 license = licenses.bsd2;
27 };
28}