2014-05-07 22:13:35 +02:00
|
|
|
{ stdenv, fetchurl, tcl, tk, libX11, glibc }:
|
2012-11-11 14:12:42 +01:00
|
|
|
|
2014-05-07 22:13:35 +02:00
|
|
|
let
|
|
|
|
libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc}/include";
|
|
|
|
libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc}/lib";
|
|
|
|
in
|
2012-11-08 17:30:44 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "tkgate-2.0-b10";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.tkgate.org/downloads/${name}.tgz";
|
|
|
|
sha256 = "0mr061xcwjmd8nhyjjcw2dzxqi53hv9xym9xsp0cw98knz2skxjf";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ tcl tk libX11 ];
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i configure \
|
2014-05-07 22:13:35 +02:00
|
|
|
-e 's|TKGATE_INCDIRS=.*|TKGATE_INCDIRS="${tcl}/include ${tk}/include ${libiconvInc}"|' \
|
|
|
|
-e 's|TKGATE_LIBDIRS=.*|TKGATE_LIBDIRS="${tcl}/lib ${tk}/lib ${libiconvLib}"|'
|
2012-11-08 17:30:44 +01:00
|
|
|
sed -i options.h \
|
|
|
|
-e 's|.* #define TCL_LIBRARY .*|#define TCL_LIBRARY "${tcl}/${tcl.libdir}"|' \
|
|
|
|
-e 's|.* #define TK_LIBRARY .*|#define TK_LIBRARY "${tk}/lib/${tk.libPrefix}"|'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Event driven digital circuit simulator with a TCL/TK-based graphical editor";
|
|
|
|
homepage = "http://www.tkgate.org/";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2014-04-25 10:04:30 +02:00
|
|
|
broken = true;
|
2012-11-08 17:30:44 +01:00
|
|
|
};
|
|
|
|
}
|