forked from mirrors/nixpkgs
pikchr: enable tcl support
This commit is contained in:
parent
48125f1ee9
commit
7f0ebaecd1
|
@ -1,6 +1,9 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchfossil
|
||||
, tcl
|
||||
|
||||
, enableTcl ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -19,14 +22,27 @@ stdenv.mkDerivation {
|
|||
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;
|
||||
checkTarget = "test";
|
||||
|
||||
|
|
Loading…
Reference in a new issue