2021-04-17 00:35:05 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchfossil
|
2021-04-17 00:35:05 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "pikchr";
|
2021-08-18 13:19:15 +00:00
|
|
|
# To update, use the last check-in in https://pikchr.org/home/timeline?r=trunk
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "unstable-2022-12-07";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
src = fetchfossil {
|
|
|
|
url = "https://pikchr.org/home";
|
|
|
|
rev = "21ca6b843d65c404";
|
|
|
|
sha256 = "sha256-fp06GqpLa/szRCS54KJ+SkT602oWvK3KyDFFjTmpNfI=";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# can't open generated html files
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile --replace open "test -f"
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 pikchr $out/bin/pikchr
|
|
|
|
install -Dm755 pikchr.out $out/lib/pikchr.o
|
|
|
|
install -Dm644 pikchr.h $out/include/pikchr.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A PIC-like markup language for diagrams in technical documentation";
|
|
|
|
homepage = "https://pikchr.org";
|
|
|
|
license = licenses.bsd0;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|