3ee1b52371
Changelog for Tcl: https://github.com/tcltk/tcl/blob/core-8-6-9/changes#L8797 Changelog for Tk: https://github.com/tcltk/tk/blob/master/changes#L7417 Tk release is actually v8.6.9.1 while Tcl is v8.6.9
56 lines
1.4 KiB
Nix
56 lines
1.4 KiB
Nix
{ stdenv, lib, src, pkgconfig, tcl, libXft, fontconfig, patches ? []
|
|
, enableAqua ? stdenv.isDarwin, darwin
|
|
, ... }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "tk-${tcl.version}";
|
|
|
|
inherit src patches;
|
|
|
|
outputs = [ "out" "man" "dev" ];
|
|
|
|
setOutputFlags = false;
|
|
|
|
preConfigure = ''
|
|
configureFlagsArray+=(--mandir=$man/share/man --enable-man-symlinks)
|
|
cd unix
|
|
'';
|
|
|
|
postInstall = ''
|
|
ln -s $out/bin/wish* $out/bin/wish
|
|
cp ../{unix,generic}/*.h $out/include
|
|
ln -s $out/lib/libtk${tcl.release}.so $out/lib/libtk.so
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--enable-threads"
|
|
"--with-tcl=${tcl}/lib"
|
|
] ++ stdenv.lib.optional stdenv.is64bit "--enable-64bit"
|
|
++ stdenv.lib.optional enableAqua "--enable-aqua";
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
propagatedBuildInputs = [ tcl libXft ]
|
|
++ lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [
|
|
Cocoa cf-private
|
|
]);
|
|
|
|
doCheck = false; # fails. can't find itself
|
|
|
|
inherit tcl;
|
|
|
|
passthru = rec {
|
|
inherit (tcl) release version;
|
|
libPrefix = "tk${tcl.release}";
|
|
libdir = "lib/${libPrefix}";
|
|
};
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages";
|
|
homepage = https://www.tcl.tk/;
|
|
license = licenses.tcltk;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ lovek323 vrthra ];
|
|
};
|
|
}
|