tcl-9_0: init

This commit is contained in:
Francesco Gazzetta 2024-09-27 11:40:39 +02:00
parent 84849472fb
commit ec6950e63a
3 changed files with 41 additions and 2 deletions

View File

@ -0,0 +1,16 @@
{ callPackage, fetchzip, ... }@args:
callPackage ./generic.nix (
args
// rec {
release = "9.0";
version = "${release}.0";
# Note: when updating, the hash in pkgs/development/libraries/tk/9.0.nix must also be updated!
src = fetchzip {
url = "mirror://sourceforge/tcl/tcl${version}-src.tar.gz";
sha256 = "sha256-QaPSY6kfxyc3x+2ptzEmN2puZ0gSFSeeNjPuxsVKXYE=";
};
}
)

View File

@ -1,5 +1,5 @@
{ lib, stdenv, callPackage, makeSetupHook, runCommand { lib, stdenv, callPackage, makeSetupHook, runCommand
, tzdata , tzdata, zip, zlib
# Version specific stuff # Version specific stuff
, release, version, src , release, version, src
@ -24,17 +24,39 @@ let
--replace "/usr/local/etc/zoneinfo" "" --replace "/usr/local/etc/zoneinfo" ""
''; '';
nativeBuildInputs = lib.optionals (lib.versionAtLeast version "9.0") [
# Only used to detect the presence of zlib. Could be replaced with a stub.
zip
];
buildInputs = lib.optionals (lib.versionAtLeast version "9.0") [
zlib
];
preConfigure = '' preConfigure = ''
cd unix cd unix
''; '';
configureFlags = [ # Note: pre-9.0 flags are temporarily interspersed to avoid a mass rebuild.
configureFlags = lib.optionals (lib.versionOlder version "9.0") [
"--enable-threads" "--enable-threads"
] ++ [
# Note: using $out instead of $man to prevent a runtime dependency on $man. # Note: using $out instead of $man to prevent a runtime dependency on $man.
"--mandir=${placeholder "out"}/share/man" "--mandir=${placeholder "out"}/share/man"
] ++ lib.optionals (lib.versionOlder version "9.0") [
"--enable-man-symlinks" "--enable-man-symlinks"
# Don't install tzdata because NixOS already has a more up-to-date copy. # Don't install tzdata because NixOS already has a more up-to-date copy.
"--with-tzdata=no" "--with-tzdata=no"
] ++ lib.optionals (lib.versionAtLeast version "9.0") [
# By default, tcl libraries get zipped and embedded into libtcl*.so,
# which gets `zipfs mount`ed at runtime. This is fragile (for example
# stripping the .so removes the zip trailer), so we install them as
# traditional files.
# This might make tcl slower to start from slower storage on cold cache,
# however according to my benchmarks on fast storage and warm cache
# tcl built with --disable-zipfs actually starts in half the time.
"--disable-zipfs"
] ++ [
"tcl_cv_strtod_unbroken=ok" "tcl_cv_strtod_unbroken=ok"
] ++ lib.optional stdenv.hostPlatform.is64bit "--enable-64bit"; ] ++ lib.optional stdenv.hostPlatform.is64bit "--enable-64bit";

View File

@ -16619,6 +16619,7 @@ with pkgs;
tcl = tcl-8_6; tcl = tcl-8_6;
tcl-8_5 = callPackage ../development/interpreters/tcl/8.5.nix { }; tcl-8_5 = callPackage ../development/interpreters/tcl/8.5.nix { };
tcl-8_6 = callPackage ../development/interpreters/tcl/8.6.nix { }; tcl-8_6 = callPackage ../development/interpreters/tcl/8.6.nix { };
tcl-9_0 = callPackage ../development/interpreters/tcl/9.0.nix { };
tclreadline = callPackage ../development/interpreters/tclreadline { }; tclreadline = callPackage ../development/interpreters/tclreadline { };