diff options
author | Peter Simons <simons@cryp.to> | 2012-11-08 17:30:44 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2012-11-08 17:30:50 +0100 |
commit | 86fa903f6c3be1b9d59c94931db1e771b4ac96f0 (patch) | |
tree | d216f2e62f48ec900fc0d0535307e5d8d80964f2 /pkgs/applications/science/electronics/tkgate | |
parent | 140d91fdc9d774d3d7f2172fe00c922212179678 (diff) |
tkgate: add versions 1.8.7 and 2.0-b10
Diffstat (limited to 'pkgs/applications/science/electronics/tkgate')
-rw-r--r-- | pkgs/applications/science/electronics/tkgate/1.x.nix | 36 | ||||
-rw-r--r-- | pkgs/applications/science/electronics/tkgate/2.x.nix | 31 |
2 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/applications/science/electronics/tkgate/1.x.nix b/pkgs/applications/science/electronics/tkgate/1.x.nix new file mode 100644 index 000000000000..97806f7662a2 --- /dev/null +++ b/pkgs/applications/science/electronics/tkgate/1.x.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, tcl, tk, libX11, libiconvOrLibc, which, yacc, flex, imake, xproto, gccmakedep }: + +stdenv.mkDerivation rec { + name = "tkgate-1.8.7"; + + src = fetchurl { + url = "http://www.tkgate.org/downloads/${name}.tgz"; + sha256 = "1pqywkidfpdbj18i03h97f4cimld4fb3mqfy8jjsxs12kihm18fs"; + }; + + buildInputs = [ tcl tk libX11 libiconvOrLibc which yacc flex imake xproto gccmakedep ]; + + patchPhase = '' + sed -i config.h \ + -e 's|.*#define.*TKGATE_TCLTK_VERSIONS.*|#define TKGATE_TCLTK_VERSIONS "8.5"|' \ + -e 's|.*#define.*TKGATE_INCDIRS.*|#define TKGATE_INCDIRS "${tcl}/include ${tk}/include ${libiconvOrLibc}/include ${libX11}/include"|' \ + -e 's|.*#define.*TKGATE_LIBDIRS.*|#define TKGATE_LIBDIRS "${tcl}/lib ${tk}/lib ${libiconvOrLibc}/lib ${libX11}/lib"|' \ + \ + -e '20 i #define TCL_LIBRARY "${tcl}/lib"' \ + -e '20 i #define TK_LIBRARY "${tk}/lib/${tk.libPrefix}"' \ + -e '20 i #define USE_ICONV 1' \ + \ + -e "s|.*#define.*TKGATE_HOMEDIRBASE.*|#define TKGATE_HOMEDIRBASE \\\"$out/lib\\\"|" \ + -e "s|.*#define.*TKGATE_BINDIR.*|#define TKGATE_BINDIR \\\"$out/bin\\\"|" \ + -e "s|.*#define.*TKGATE_MANDIR.*|#define TKGATE_MANDIR \\\"$out/share/man/man1\\\"|" \ + -e "s|file:/usr/X11R6/lib/tkgate-|file://$out/lib/tkgate-|" + ''; + + meta = { + description = "Event driven digital circuit simulator with a TCL/TK-based graphical editor"; + homepage = "http://www.tkgate.org/"; + license = "GPLv2+"; + maintainers = [ stdenv.lib.maintainers.simons ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/science/electronics/tkgate/2.x.nix b/pkgs/applications/science/electronics/tkgate/2.x.nix new file mode 100644 index 000000000000..608a2f890ab4 --- /dev/null +++ b/pkgs/applications/science/electronics/tkgate/2.x.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, tcl, tk, libX11, libiconvOrLibc }: + +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 \ + -e 's|TKGATE_INCDIRS=.*|TKGATE_INCDIRS="${tcl}/include ${tk}/include ${libiconvOrLibc}/include"|' \ + -e 's|TKGATE_LIBDIRS=.*|TKGATE_LIBDIRS="${tcl}/lib ${tk}/lib ${libiconvOrLibc}/lib"|' + 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/"; + license = "GPLv2+"; + maintainers = [ stdenv.lib.maintainers.simons ]; + platforms = stdenv.lib.platforms.linux; + }; +} |