2019-04-09 18:44:38 -07:00
|
|
|
{ stdenv, lib, src, pkgconfig, tcl, libXft, fontconfig, patches ? []
|
|
|
|
, enableAqua ? stdenv.isDarwin, darwin
|
|
|
|
, ... }:
|
2009-05-03 07:36:26 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2015-04-26 20:55:07 -07:00
|
|
|
name = "tk-${tcl.version}";
|
2014-04-12 01:44:17 -07:00
|
|
|
|
2015-06-19 06:54:35 -07:00
|
|
|
inherit src patches;
|
2014-04-12 01:44:17 -07:00
|
|
|
|
2016-09-01 06:17:36 -07:00
|
|
|
outputs = [ "out" "man" "dev" ];
|
2016-09-01 06:15:07 -07:00
|
|
|
|
|
|
|
setOutputFlags = false;
|
2014-04-12 01:44:17 -07:00
|
|
|
|
2015-04-30 11:42:43 -07:00
|
|
|
preConfigure = ''
|
2016-09-01 06:15:07 -07:00
|
|
|
configureFlagsArray+=(--mandir=$man/share/man --enable-man-symlinks)
|
2015-04-30 11:42:43 -07:00
|
|
|
cd unix
|
|
|
|
'';
|
2014-04-12 01:44:17 -07:00
|
|
|
|
2016-09-01 06:15:07 -07:00
|
|
|
postInstall = ''
|
|
|
|
ln -s $out/bin/wish* $out/bin/wish
|
2016-12-25 11:35:51 -08:00
|
|
|
cp ../{unix,generic}/*.h $out/include
|
2019-04-22 14:47:48 -07:00
|
|
|
ln -s $out/lib/libtk${tcl.release}.so $out/lib/libtk.so
|
2019-05-27 11:54:51 -07:00
|
|
|
''
|
|
|
|
+ stdenv.lib.optionalString (stdenv.isDarwin) ''
|
|
|
|
cp ../macosx/*.h $out/include
|
2016-09-01 06:15:07 -07:00
|
|
|
'';
|
|
|
|
|
2015-04-30 11:42:43 -07:00
|
|
|
configureFlags = [
|
2019-04-22 14:47:48 -07:00
|
|
|
"--enable-threads"
|
2015-04-30 11:42:43 -07:00
|
|
|
"--with-tcl=${tcl}/lib"
|
2019-04-22 14:47:48 -07:00
|
|
|
] ++ stdenv.lib.optional stdenv.is64bit "--enable-64bit"
|
|
|
|
++ stdenv.lib.optional enableAqua "--enable-aqua";
|
2009-05-03 07:36:26 -07:00
|
|
|
|
2017-09-05 14:26:13 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2014-04-12 01:44:17 -07:00
|
|
|
|
2019-04-21 13:24:48 -07:00
|
|
|
propagatedBuildInputs = [ tcl libXft ]
|
|
|
|
++ lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [
|
2019-04-09 18:44:38 -07:00
|
|
|
Cocoa cf-private
|
|
|
|
]);
|
2014-04-13 05:56:54 -07:00
|
|
|
|
2018-04-24 20:20:18 -07:00
|
|
|
doCheck = false; # fails. can't find itself
|
|
|
|
|
2009-05-03 07:36:26 -07:00
|
|
|
inherit tcl;
|
2010-05-28 03:57:50 -07:00
|
|
|
|
2015-04-26 20:55:07 -07:00
|
|
|
passthru = rec {
|
|
|
|
inherit (tcl) release version;
|
|
|
|
libPrefix = "tk${tcl.release}";
|
|
|
|
libdir = "lib/${libPrefix}";
|
2010-05-28 03:57:50 -07:00
|
|
|
};
|
2013-06-29 15:39:32 -07:00
|
|
|
|
2015-04-30 11:42:43 -07:00
|
|
|
meta = with stdenv.lib; {
|
2013-06-29 15:39:32 -07:00
|
|
|
description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages";
|
2019-04-22 14:47:48 -07:00
|
|
|
homepage = https://www.tcl.tk/;
|
2015-04-30 11:42:43 -07:00
|
|
|
license = licenses.tcltk;
|
|
|
|
platforms = platforms.all;
|
2019-01-26 02:01:09 -08:00
|
|
|
maintainers = with maintainers; [ lovek323 vrthra ];
|
2013-06-29 15:39:32 -07:00
|
|
|
};
|
2009-05-03 07:36:26 -07:00
|
|
|
}
|