2021-01-23 13:15:07 +00:00
|
|
|
{ lib, stdenv
|
2015-04-27 05:15:25 +01:00
|
|
|
|
|
|
|
# Version specific stuff
|
|
|
|
, release, version, src
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "tcl";
|
|
|
|
inherit version;
|
2009-04-23 14:31:10 +01:00
|
|
|
|
2015-04-27 05:15:25 +01:00
|
|
|
inherit src;
|
2009-04-23 14:31:10 +01:00
|
|
|
|
2016-09-01 14:09:28 +01:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
setOutputFlags = false;
|
|
|
|
|
2015-04-30 19:42:43 +01:00
|
|
|
preConfigure = ''
|
|
|
|
cd unix
|
|
|
|
'';
|
2009-04-23 14:31:10 +01:00
|
|
|
|
2018-12-11 22:45:07 +00:00
|
|
|
configureFlags = [
|
2018-12-11 22:48:45 +00:00
|
|
|
"--enable-threads"
|
2018-12-11 22:45:07 +00:00
|
|
|
# Note: using $out instead of $man to prevent a runtime dependency on $man.
|
|
|
|
"--mandir=${placeholder "out"}/share/man"
|
|
|
|
"--enable-man-symlinks"
|
|
|
|
# Don't install tzdata because NixOS already has a more up-to-date copy.
|
|
|
|
"--with-tzdata=no"
|
|
|
|
"tcl_cv_strtod_unbroken=ok"
|
2021-01-23 13:15:07 +00:00
|
|
|
] ++ lib.optional stdenv.is64bit "--enable-64bit";
|
2018-12-11 22:45:07 +00:00
|
|
|
|
2016-09-01 14:09:28 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-12-19 14:41:45 +00:00
|
|
|
postInstall = let
|
|
|
|
dllExtension = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
|
|
in ''
|
2009-04-23 14:31:10 +01:00
|
|
|
make install-private-headers
|
2015-04-27 04:55:07 +01:00
|
|
|
ln -s $out/bin/tclsh${release} $out/bin/tclsh
|
2019-12-19 14:41:45 +00:00
|
|
|
ln -s $out/lib/libtcl${release}${dllExtension} $out/lib/libtcl${dllExtension}
|
2009-04-23 14:31:10 +01:00
|
|
|
'';
|
2016-09-01 14:09:28 +01:00
|
|
|
|
2021-01-23 13:15:07 +00:00
|
|
|
meta = with lib; {
|
2019-04-22 22:47:48 +01:00
|
|
|
description = "The Tcl scripting language";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.tcl.tk/";
|
2015-04-27 04:55:07 +01:00
|
|
|
license = licenses.tcltk;
|
|
|
|
platforms = platforms.all;
|
2019-01-26 10:01:09 +00:00
|
|
|
maintainers = with maintainers; [ vrthra ];
|
2005-11-22 12:05:18 +00:00
|
|
|
};
|
2016-09-01 14:09:28 +01:00
|
|
|
|
2015-04-27 04:55:07 +01:00
|
|
|
passthru = rec {
|
|
|
|
inherit release version;
|
|
|
|
libPrefix = "tcl${release}";
|
|
|
|
libdir = "lib/${libPrefix}";
|
2012-04-14 22:40:55 +01:00
|
|
|
};
|
2005-11-22 12:05:18 +00:00
|
|
|
}
|