2022-03-23 13:24:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2014-09-09 11:18:58 +00:00
|
|
|
|
2022-03-23 13:24:19 +00:00
|
|
|
, asciidoc
|
|
|
|
, pkg-config
|
|
|
|
, inetutils
|
2023-09-06 14:13:15 +00:00
|
|
|
, tcl
|
2017-02-08 00:11:16 +00:00
|
|
|
|
2022-03-23 13:24:19 +00:00
|
|
|
, sqlite
|
|
|
|
, readline
|
|
|
|
, SDL
|
|
|
|
, SDL_gfx
|
2023-03-07 09:20:46 +00:00
|
|
|
, openssl
|
2023-09-06 14:13:15 +00:00
|
|
|
|
|
|
|
, SDLSupport ? true
|
2022-03-23 13:24:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "jimtcl";
|
2023-03-07 09:20:46 +00:00
|
|
|
version = "0.82";
|
2014-09-09 11:18:58 +00:00
|
|
|
|
2016-06-23 02:55:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "msteveb";
|
|
|
|
repo = "jimtcl";
|
2017-02-08 00:11:16 +00:00
|
|
|
rev = version;
|
2023-03-07 09:20:46 +00:00
|
|
|
sha256 = "sha256-CDjjrxpoTbLESAbCiCjQ8+E/oJP87gDv9SedQOzH3QY=";
|
2014-09-09 11:18:58 +00:00
|
|
|
};
|
|
|
|
|
2019-11-30 23:13:37 +00:00
|
|
|
nativeBuildInputs = [
|
2022-03-23 13:24:19 +00:00
|
|
|
pkg-config
|
2019-11-30 23:13:37 +00:00
|
|
|
asciidoc
|
2023-09-06 14:13:15 +00:00
|
|
|
tcl
|
2014-09-09 11:18:58 +00:00
|
|
|
];
|
|
|
|
|
2019-11-30 23:13:37 +00:00
|
|
|
buildInputs = [
|
2023-03-07 09:20:46 +00:00
|
|
|
sqlite
|
|
|
|
readline
|
2023-09-06 14:13:15 +00:00
|
|
|
openssl
|
|
|
|
] ++ (lib.optionals SDLSupport [
|
2023-03-07 09:20:46 +00:00
|
|
|
SDL
|
|
|
|
SDL_gfx
|
2023-09-06 14:13:15 +00:00
|
|
|
]);
|
2016-09-01 08:26:10 +00:00
|
|
|
|
2014-09-09 11:18:58 +00:00
|
|
|
configureFlags = [
|
2019-11-30 23:13:37 +00:00
|
|
|
"--shared"
|
2014-09-09 11:18:58 +00:00
|
|
|
"--with-ext=oo"
|
|
|
|
"--with-ext=tree"
|
|
|
|
"--with-ext=binary"
|
|
|
|
"--with-ext=sqlite3"
|
2016-06-23 02:55:20 +00:00
|
|
|
"--with-ext=readline"
|
2019-11-30 23:13:37 +00:00
|
|
|
"--with-ext=json"
|
2014-09-09 11:18:58 +00:00
|
|
|
"--enable-utf8"
|
|
|
|
"--ipv6"
|
2023-09-06 14:13:15 +00:00
|
|
|
] ++ (lib.optional SDLSupport "--with-ext=sdl");
|
2014-09-09 11:18:58 +00:00
|
|
|
|
2019-11-30 23:13:37 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
|
|
|
# test exec2-3.2 fails depending on platform or sandboxing (?)
|
|
|
|
rm tests/exec2.test
|
2023-03-07 09:20:46 +00:00
|
|
|
# requires internet access
|
|
|
|
rm tests/ssl.test
|
2023-09-06 14:13:15 +00:00
|
|
|
# test fails due to timing in some environments
|
|
|
|
# https://github.com/msteveb/jimtcl/issues/282
|
|
|
|
rm tests/timer.test
|
2019-11-30 23:13:37 +00:00
|
|
|
'';
|
|
|
|
|
2022-03-23 13:24:19 +00:00
|
|
|
# test posix-1.6 needs the "hostname" command
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ inetutils ];
|
2022-03-23 13:24:19 +00:00
|
|
|
|
2014-09-09 11:18:58 +00:00
|
|
|
meta = {
|
2014-09-09 11:29:37 +00:00
|
|
|
description = "An open source small-footprint implementation of the Tcl programming language";
|
2019-11-30 23:13:37 +00:00
|
|
|
homepage = "http://jim.tcl.tk/";
|
2021-01-23 13:15:07 +00:00
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
platforms = lib.platforms.all;
|
2022-03-23 13:24:34 +00:00
|
|
|
maintainers = with lib.maintainers; [ dbohdan fgaz vrthra ];
|
2014-09-09 11:18:58 +00:00
|
|
|
};
|
|
|
|
}
|