1 { lib, stdenv, fetchurl, cmake }:
3 stdenv.mkDerivation rec {
8 url = "https://ctpp.havoc.ru/download/${pname}-${version}.tar.gz";
9 sha256 = "1z22zfw9lb86z4hcan9hlvji49c9b7vznh7gjm95gnvsh43zsgx8";
12 nativeBuildInputs = [ cmake ];
15 # include <unistd.h> to fix undefined getcwd
16 sed -ie 's/<stdlib.h>/<stdlib.h>\n#include <unistd.h>/' src/CTPP2FileSourceLoader.cpp
20 # RPATH of binary /nix/store/.../bin/ctpp2json contains a forbidden reference to /build/
21 "-DCMAKE_SKIP_BUILD_RPATH=ON"
24 doCheck = false; # fails
27 description = "High performance templating engine";
28 homepage = "https://ctpp.havoc.ru/";
29 maintainers = [ maintainers.robbinch ];
30 platforms = platforms.linux;
31 license = licenses.bsd2;