mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 01:03:25 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchfossil
|
|
, tcl
|
|
|
|
, enableTcl ? true
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "pikchr";
|
|
# To update, use the last check-in in https://pikchr.org/home/timeline?r=trunk
|
|
version = "0-unstable-2024-02-12";
|
|
|
|
src = fetchfossil {
|
|
url = "https://pikchr.org/home";
|
|
rev = "ae3317b0ec2e635c";
|
|
hash = "sha256-kCbd6XAaUCwFVYOPPLIux7wW62KRfVnfaxT8Z1RGFfc=";
|
|
};
|
|
|
|
# can't open generated html files
|
|
postPatch = ''
|
|
substituteInPlace Makefile --replace open "test -f"
|
|
'';
|
|
|
|
nativeBuildInputs = lib.optional enableTcl tcl.tclPackageHook;
|
|
|
|
buildInputs = lib.optional enableTcl tcl;
|
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
|
|
|
buildFlags = [ "pikchr" ] ++ lib.optional enableTcl "piktcl";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm755 pikchr $out/bin/pikchr
|
|
install -Dm755 pikchr.out $out/lib/pikchr.o
|
|
install -Dm644 pikchr.h $out/include/pikchr.h
|
|
'' + lib.optionalString enableTcl ''
|
|
cp -r piktcl $out/lib/piktcl
|
|
'' + ''
|
|
runHook postInstall
|
|
'';
|
|
|
|
dontWrapTclBinaries = true;
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "PIC-like markup language for diagrams in technical documentation";
|
|
homepage = "https://pikchr.org";
|
|
license = licenses.bsd0;
|
|
maintainers = with maintainers; [ fgaz ];
|
|
platforms = platforms.all;
|
|
mainProgram = "pikchr";
|
|
};
|
|
}
|