depot/third_party/nixpkgs/pkgs/tools/graphics/pikchr/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

39 lines
996 B
Nix

{ lib
, stdenv
, fetchurl
}:
stdenv.mkDerivation {
pname = "pikchr";
# To update, use the last check-in in https://pikchr.org/home/timeline?r=trunk
version = "unstable-2022-06-20";
src = fetchurl {
url = "https://pikchr.org/home/tarball/d9ee756594b6eb64/pikchr.tar.gz";
sha256 = "sha256-ML+gymFrBay1kly7NYsxo0I1qNMoZPzNI3ClBTrWlHw=";
};
# can't open generated html files
postPatch = ''
substituteInPlace Makefile --replace open "test -f"
'';
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
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;
};
}