2014-04-12 09:44:17 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, tcl, libXft, fontconfig }:
|
2009-05-03 15:36:26 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2015-04-27 04:55:07 +01:00
|
|
|
name = "tk-${tcl.version}";
|
2014-04-12 09:44:17 +01:00
|
|
|
|
2009-05-03 15:36:26 +01:00
|
|
|
src = fetchurl {
|
2015-04-27 04:55:07 +01:00
|
|
|
url = "mirror://sourceforge/tcl/tk${tcl.version}-src.tar.gz";
|
2015-03-29 22:01:38 +01:00
|
|
|
sha256 = "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88";
|
2009-05-03 15:36:26 +01:00
|
|
|
};
|
2014-01-25 02:36:20 +00:00
|
|
|
|
|
|
|
patches = [ ./different-prefix-with-tcl.patch ];
|
2014-04-12 09:44:17 +01:00
|
|
|
|
2009-05-03 15:36:26 +01:00
|
|
|
postInstall = ''
|
|
|
|
ln -s $out/bin/wish* $out/bin/wish
|
|
|
|
'';
|
2014-04-12 09:44:17 +01:00
|
|
|
|
2015-04-30 19:42:43 +01:00
|
|
|
preConfigure = ''
|
|
|
|
cd unix
|
|
|
|
'';
|
2014-04-12 09:44:17 +01:00
|
|
|
|
2015-04-30 19:42:43 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--with-tcl=${tcl}/lib"
|
|
|
|
];
|
2009-05-03 15:36:26 +01:00
|
|
|
|
2014-04-12 09:44:17 +01:00
|
|
|
buildInputs = [ pkgconfig tcl libXft ]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin fontconfig;
|
|
|
|
|
2014-04-13 13:56:54 +01:00
|
|
|
NIX_CFLAGS_LINK = if stdenv.isDarwin then "-lfontconfig" else null;
|
|
|
|
|
2009-05-03 15:36:26 +01:00
|
|
|
inherit tcl;
|
2010-05-28 11:57:50 +01:00
|
|
|
|
2015-04-27 04:55:07 +01:00
|
|
|
passthru = rec {
|
|
|
|
inherit (tcl) release version;
|
|
|
|
libPrefix = "tk${tcl.release}";
|
|
|
|
libdir = "lib/${libPrefix}";
|
2010-05-28 11:57:50 +01:00
|
|
|
};
|
2013-06-29 23:39:32 +01:00
|
|
|
|
2015-04-30 19:42:43 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-06-29 23:39:32 +01:00
|
|
|
description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages";
|
|
|
|
homepage = http://www.tcl.tk/;
|
2015-04-30 19:42:43 +01:00
|
|
|
license = licenses.tcltk;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ lovek323 wkennington ];
|
2013-06-29 23:39:32 +01:00
|
|
|
};
|
2009-05-03 15:36:26 +01:00
|
|
|
}
|