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