1 { stdenv, lib, src, pkg-config, tcl, libXft, patches ? []
2 , enableAqua ? stdenv.isDarwin, darwin
11 outputs = [ "out" "man" "dev" ];
13 setOutputFlags = false;
16 configureFlagsArray+=(--mandir=$man/share/man --enable-man-symlinks)
21 for file in $(find library/demos/. -type f ! -name "*.*"); do
22 substituteInPlace $file --replace "exec wish" "exec $out/bin/wish"
25 + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") ''
26 substituteInPlace unix/configure* \
27 --replace " -framework UniformTypeIdentifiers" ""
31 ln -s $out/bin/wish* $out/bin/wish
32 cp ../{unix,generic}/*.h $out/include
33 ln -s $out/lib/libtk${tcl.release}${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libtk${stdenv.hostPlatform.extensions.sharedLibrary}
35 + lib.optionalString (stdenv.isDarwin) ''
36 cp ../macosx/*.h $out/include
41 ] ++ lib.optional stdenv.is64bit "--enable-64bit"
42 ++ lib.optional enableAqua "--enable-aqua";
44 nativeBuildInputs = [ pkg-config ];
47 propagatedBuildInputs = [
49 ] ++ lib.optionals enableAqua ([
50 darwin.apple_sdk.frameworks.Cocoa
51 ] ++ lib.optionals (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") [
52 darwin.apple_sdk.frameworks.UniformTypeIdentifiers
55 enableParallelBuilding = true;
57 doCheck = false; # fails. can't find itself
62 inherit (tcl) release version;
63 libPrefix = "tk${tcl.release}";
64 libdir = "lib/${libPrefix}";
68 description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages";
69 homepage = "https://www.tcl.tk/";
70 license = licenses.tcltk;
71 platforms = platforms.all;
72 maintainers = with maintainers; [ lovek323 vrthra ];