Files
nixpkgs/pkgs/by-name/ct/ctpp2/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

39 lines
885 B
Nix

{
lib,
stdenv,
fetchurl,
cmake,
}:
stdenv.mkDerivation rec {
pname = "ctpp2";
version = "2.8.3";
src = fetchurl {
url = "https://ctpp.havoc.ru/download/${pname}-${version}.tar.gz";
sha256 = "1z22zfw9lb86z4hcan9hlvji49c9b7vznh7gjm95gnvsh43zsgx8";
};
nativeBuildInputs = [ cmake ];
patchPhase = ''
# include <unistd.h> to fix undefined getcwd
sed -i -e 's/<stdlib.h>/<stdlib.h>\n#include <unistd.h>/' src/CTPP2FileSourceLoader.cpp
'';
cmakeFlags = [
# RPATH of binary /nix/store/.../bin/ctpp2json contains a forbidden reference to /build/
"-DCMAKE_SKIP_BUILD_RPATH=ON"
];
doCheck = false; # fails
meta = with lib; {
description = "High performance templating engine";
homepage = "https://ctpp.havoc.ru/";
maintainers = [ maintainers.robbinch ];
platforms = platforms.linux;
license = licenses.bsd2;
};
}