push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# Name-based Tcl package directories
The structure of this directory is identical to the one described in
[/pkgs/by-name/README.md](../../../by-name/README.md).
The only difference is the scope:
```nix
{
lib,
# You can get tclPackages attributes directly
mkTclDerivation,
tcllib,
}:
mkTclDerivation {
# ...
}
```

View File

@@ -0,0 +1,32 @@
{
lib,
fetchurl,
mkTclDerivation,
tk,
}:
mkTclDerivation rec {
pname = "bwidget";
version = "1.10.0";
src = fetchurl {
url = "mirror://sourceforge/tcllib/bwidget-${version}.tar.gz";
sha256 = "sha256-61sCvsua+Iv3SldHhd4eMpzzCjZ5EVMJOnkRT6xRw60=";
};
dontBuild = true;
propagatedBuildInputs = [ tk ];
installPhase = ''
mkdir -p "$out/lib/bwidget${version}"
cp -R *.tcl lang images "$out/lib/bwidget${version}"
'';
meta = {
homepage = "https://sourceforge.net/projects/tcllib";
description = "High-level widget set for Tcl/Tk";
maintainers = with lib.maintainers; [ agbrooks ];
license = lib.licenses.tcltk;
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,295 @@
From: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Subject: [PATCH] enable cross compilation for expect
This patch was created by running ./configure on a modern Linux machine
and inserting the results into the cross compilation section of
each AC_MSG_CHECKING that bombed out with an error.
Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
--
The original patch, and description above, is originally from
https://github.com/buildroot/buildroot/blob/master/package/expect/0001-enable-cross-compilation.patch
This patch has been further modified to not hard-code Linux assumptions.
---
Index: expect-5.45/configure.in
===================================================================
--- expect-5.45.orig/configure.in 2013-11-14 07:59:58.732100595 -0600
+++ expect-5.45/configure.in 2013-11-14 07:59:58.732100595 -0600
@@ -6,10 +6,12 @@
AC_INIT([expect],[5.45.4])
TEA_INIT([3.9])
AC_CONFIG_AUX_DIR(tclconfig)
+
+AC_LANG([C])
#--------------------------------------------------------------------
# Configure script for package 'Expect'.
# TEA compliant.
#--------------------------------------------------------------------
@@ -465,26 +467,20 @@
# Some systems only define WNOHANG if _POSIX_SOURCE is defined
# The following merely tests that sys/wait.h can be included
# and if so that WNOHANG is not defined. The only place I've
# seen this is ISC.
AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
-AC_TRY_RUN([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <sys/wait.h>
-int
-main() {
#ifndef WNOHANG
- return 0;
-#else
- return 1;
+# error "WNOHANG requires _POSIX_SOURCE to be defined"
#endif
-}],
+]])],
AC_MSG_RESULT(yes)
AC_DEFINE(WNOHANG_REQUIRES_POSIX_SOURCE)
,
AC_MSG_RESULT(no)
-,
- AC_MSG_ERROR([Expect can't be cross compiled])
)
AC_MSG_CHECKING([if any value exists for WNOHANG])
rm -rf wnohang
AC_TRY_RUN([
@@ -504,11 +501,12 @@
rm -f wnohang
,
AC_MSG_RESULT(no)
AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
,
- AC_MSG_ERROR([Expect can't be cross compiled])
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
)
#
# check how signals work
#
@@ -572,11 +570,11 @@
}],
AC_MSG_RESULT(yes)
AC_DEFINE(REARM_SIG)
,
AC_MSG_RESULT(no)
-, AC_MSG_WARN([Expect can't be cross compiled])
+, AC_MSG_RESULT(no)
)
# HPUX7 has trouble with the big cat so split it
# Owen Rees <rtor@ansa.co.uk> 29Mar93
SEDDEFS="${SEDDEFS}CONFEOF
@@ -710,25 +708,19 @@
AC_DEFINE(POSIX)
fi
# first check for the pure bsd
AC_MSG_CHECKING([for struct sgttyb])
-AC_TRY_RUN([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <sgtty.h>
-int
-main()
-{
- struct sgttyb tmp;
- return 0;
-}],
+static struct sgttyb tmp;
+]])],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SGTTYB)
PTY_TYPE=sgttyb
,
AC_MSG_RESULT(no)
-,
- AC_MSG_ERROR([Expect can't be cross compiled])
)
# mach systems have include files for unimplemented features
# so avoid doing following test on those systems
if test $mach -eq 0 ; then
@@ -735,116 +728,88 @@
# next check for the older style ttys
# note that if we detect termio.h (only), we still set PTY_TYPE=termios
# since that just controls which of pty_XXXX.c file is use and
# pty_termios.c is set up to handle pty_termio.
AC_MSG_CHECKING([for struct termio])
- AC_TRY_RUN([#include <termio.h>
- int
- main()
- {
- struct termio tmp;
- return 0;
- }],
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <termio.h>
+static struct termio tmp;
+]])],
AC_DEFINE(HAVE_TERMIO)
PTY_TYPE=termios
AC_MSG_RESULT(yes)
,
AC_MSG_RESULT(no)
-,
- AC_MSG_ERROR([Expect can't be cross compiled])
)
# now check for the new style ttys (not yet posix)
AC_MSG_CHECKING([for struct termios])
- AC_TRY_RUN([
- /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
-# ifdef HAVE_INTTYPES_H
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+/* including termios.h on Solaris 5.6 fails unless inttypes.h included */
+#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
-# endif
-# include <termios.h>
- int
- main()
- {
- struct termios tmp;
- return 0;
- }],
+#endif
+#include <termios.h>
+static struct termios tmp;
+]])],
AC_DEFINE(HAVE_TERMIOS)
PTY_TYPE=termios
AC_MSG_RESULT(yes)
,
AC_MSG_RESULT(no)
- ,
- AC_MSG_ERROR([Expect can't be cross compiled])
)
fi
AC_MSG_CHECKING([if TCGETS or TCGETA in termios.h])
-AC_TRY_RUN([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
/* including termios.h on Solaris 5.6 fails unless inttypes.h included */
#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
+# include <inttypes.h>
#endif
#include <termios.h>
-int
-main() {
-#if defined(TCGETS) || defined(TCGETA)
- return 0;
-#else
- return 1;
+#
+#if !(defined(TCGETS) || defined(TCGETA))
+# error "missing both of TCGETS and TCGETA"
#endif
-}],
+]])],
AC_DEFINE(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H)
AC_MSG_RESULT(yes)
,
AC_MSG_RESULT(no)
-,
- AC_MSG_ERROR([Expect can't be cross compiled])
)
AC_MSG_CHECKING([if TIOCGWINSZ in termios.h])
-AC_TRY_RUN([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
/* including termios.h on Solaris 5.6 fails unless inttypes.h included */
#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
+# include <inttypes.h>
#endif
#include <termios.h>
-int
-main() {
-#ifdef TIOCGWINSZ
- return 0;
-#else
- return 1;
+
+#ifndef TIOCGWINSZ
+# error "missing TIOCGWINSZ"
#endif
-}],
+]])],
AC_DEFINE(HAVE_TIOCGWINSZ_IN_TERMIOS_H)
AC_MSG_RESULT(yes)
,
AC_MSG_RESULT(no)
-,
- AC_MSG_ERROR([Expect can't be cross compiled])
)
# finally check for Cray style ttys
AC_MSG_CHECKING([for Cray-style ptys])
SETUID=":"
-AC_TRY_RUN([
-int
-main(){
-#ifdef CRAY
- return 0;
-#else
- return 1;
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#ifndef CRAY
+# error "CRAY is not defined"
#endif
-}
-],
+]])],
PTY_TYPE=unicos
SETUID="chmod u+s"
AC_MSG_RESULT(yes)
,
AC_MSG_RESULT(no)
-,
- AC_MSG_ERROR([Expect can't be cross compiled])
)
#
# Check for select and/or poll. If both exist, we prefer select.
# if neither exists, define SIMPLE_EVENT.
@@ -873,26 +842,24 @@
#
# check for timezones
#
AC_MSG_CHECKING([for SV-style timezone])
-AC_TRY_RUN([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
extern char *tzname[2];
extern int daylight;
int
main()
{
int *x = &daylight;
char **y = tzname;
return 0;
-}],
+}]])],
AC_DEFINE(HAVE_SV_TIMEZONE)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
-,
- AC_MSG_ERROR([Expect can't be cross compiled])
)
# Following comment stolen from Tcl's configure.in:
# Note: in the following variable, it's important to use the absolute

View File

@@ -0,0 +1,11 @@
--- a/Makefile.in 2022-09-07 21:46:37.090519258 +0200
+++ b/Makefile.in 2022-09-07 21:46:21.462592279 +0200
@@ -380,7 +380,7 @@
cp $(DIST_ROOT)/$(PKG_DIR).tar.gz $(top_builddir)
$(SCRIPTS):
- $(TCLSH) $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@
+ @tcl@ $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@
## We cannot use TCL_LIBS below (after TCL_LIB_SPEC) because its
## expansion references the contents of LIBS, which contains linker

View File

@@ -0,0 +1,36 @@
diff -ur a/exp_win.c b/exp_win.c
--- a/exp_win.c 2018-02-02 14:15:52.000000000 -0500
+++ b/exp_win.c 2023-10-10 07:47:33.082690432 -0400
@@ -39,7 +39,8 @@
/* Sigh. On AIX 2.3, termios.h exists but does not define TIOCGWINSZ */
/* Instead, it has to come from ioctl.h. However, As I said above, this */
/* can't be cavalierly included on all machines, even when it exists. */
-#if defined(HAVE_TERMIOS) && !defined(HAVE_TIOCGWINSZ_IN_TERMIOS_H)
+/* Darwin also has termios.h, but it requires ioctl.h for `ioctl`. */
+#if defined(HAVE_TERMIOS) && (defined(__APPLE__) || !defined(HAVE_TIOCGWINSZ_IN_TERMIOS_H))
# include <sys/ioctl.h>
#endif
diff -ur d/pty_termios.c c/pty_termios.c
--- d/pty_termios.c 2023-10-10 07:59:23.244452442 -0400
+++ c/pty_termios.c 2023-10-10 08:00:35.303231582 -0400
@@ -7,7 +7,18 @@
*/
-#include <pty.h> /* openpty */
+/* openpty */
+#if defined(__APPLE__)
+# include <util.h>
+#elif defined(__FreeBSD__)
+# include <sys/types.h>
+# include <sys/ioctl.h>
+# include <termios.h>
+# include <libutil.h>
+#else /* pty.h is Linux-specific */
+# include <pty.h>
+#endif
+
#include <stdio.h>
#include <signal.h>

View File

@@ -0,0 +1,14 @@
--- expect5.45.4/tclconfig/tcl.m4.orig 2024-05-29 11:24:56.150656190 -0700
+++ expect5.45.4/tclconfig/tcl.m4 2024-05-29 11:25:22.850790934 -0700
@@ -1643,11 +1643,6 @@
LIBS=`echo $LIBS | sed s/-pthread//`
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
- # Version numbers are dot-stripped by system policy.
- TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
- TCL_LIB_VERSIONS_OK=nodots
;;
Darwin-*)
CFLAGS_OPTIMIZE="-Os"

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
buildPackages,
fetchurl,
tcl,
makeWrapper,
autoreconfHook,
fetchpatch,
replaceVars,
}:
tcl.mkTclDerivation rec {
pname = "expect";
version = "5.45.4";
src = fetchurl {
url = "mirror://sourceforge/expect/Expect/${version}/expect${version}.tar.gz";
hash = "sha256-Safag7C92fRtBKBN7sGcd2e7mjI+QMR4H4nK92C5LDQ=";
};
patches = [
(replaceVars ./fix-build-time-run-tcl.patch {
tcl = "${buildPackages.tcl}/bin/tclsh";
})
# The following patches fix compilation with clang 15+
(fetchpatch {
url = "https://sourceforge.net/p/expect/patches/24/attachment/0001-Add-prototype-to-function-definitions.patch";
hash = "sha256-X2Vv6VVM3KjmBHo2ukVWe5YTVXRmqe//Kw2kr73OpZs=";
})
(fetchpatch {
url = "https://sourceforge.net/p/expect/patches/_discuss/thread/b813ca9895/6759/attachment/expect-configure-c99.patch";
hash = "sha256-PxQQ9roWgVXUoCMxkXEgu+it26ES/JuzHF6oML/nk54=";
})
./0004-enable-cross-compilation.patch
# Include `sys/ioctl.h` and `util.h` on Darwin, which are required for `ioctl` and `openpty`.
# Include `termios.h` on FreeBSD for `openpty`
./fix-darwin-bsd-clang16.patch
# Remove some code which causes it to link against a file that does not exist at build time on native FreeBSD
./freebsd-unversioned.patch
];
postPatch = ''
sed -i "s,/bin/stty,$(type -p stty),g" configure.in
'';
nativeBuildInputs = [
autoreconfHook
makeWrapper
];
strictDeps = true;
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types -std=gnu17";
};
hardeningDisable = [ "format" ];
postInstall = ''
tclWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ tcl ]})
${lib.optionalString stdenv.hostPlatform.isDarwin "tclWrapperArgs+=(--prefix DYLD_LIBRARY_PATH : $out/lib/expect${version})"}
'';
outputs = [
"out"
"dev"
];
meta = with lib; {
description = "Tool for automating interactive applications";
homepage = "https://expect.sourceforge.net/";
license = licenses.publicDomain;
platforms = platforms.unix;
mainProgram = "expect";
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
mkTclDerivation,
fetchurl,
writeText,
tcl,
}:
mkTclDerivation rec {
pname = "incrtcl";
version = "4.2.3";
src = fetchurl {
url = "mirror://sourceforge/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4/itcl${version}.tar.gz";
sha256 = "sha256-idOs2GXP3ZY7ECtF+K9hg5REyK6sQ0qk+666gUQPjCY=";
};
enableParallelBuilding = true;
patchPhase = ''
substituteInPlace configure --replace "\''${TCL_SRC_DIR}/generic" "${tcl}/include"
'';
postInstall = ''
rmdir $out/bin
mv $out/lib/itcl${version}/* $out/lib
ln -s libitcl${version}${stdenv.hostPlatform.extensions.sharedLibrary} \
$out/lib/libitcl${lib.versions.major version}${stdenv.hostPlatform.extensions.sharedLibrary}
rmdir $out/lib/itcl${version}
'';
setupHook = writeText "setup-hook.sh" ''
export ITCL_LIBRARY=@out@/lib
'';
outputs = [
"out"
"dev"
"man"
];
meta = with lib; {
homepage = "https://incrtcl.sourceforge.net/";
description = "Object Oriented Enhancements for Tcl/Tk";
license = licenses.tcltk;
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice ];
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchurl,
mkTclDerivation,
tk,
incrtcl,
}:
mkTclDerivation rec {
pname = "itk-tcl";
version = "4.1.0";
src = fetchurl {
url = "mirror://sourceforge/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4/itk${version}.tar.gz";
sha256 = "1iy964jfgsfnc1agk1w6bbm44x18ily8d4wmr7cc9z9f4acn2r6s";
};
buildInputs = [
tk
incrtcl
];
enableParallelBuilding = true;
configureFlags = [
"--with-tk=${tk}/lib"
"--with-itcl=${incrtcl}/lib"
"--with-tkinclude=${tk.dev}/include"
];
postInstall = ''
rmdir $out/bin
mv $out/lib/itk${version}/* $out/lib
ln -s libitk${version}${stdenv.hostPlatform.extensions.sharedLibrary} \
$out/lib/libitk${lib.versions.major version}${stdenv.hostPlatform.extensions.sharedLibrary}
rmdir $out/lib/itk${version}
'';
outputs = [
"out"
"dev"
"man"
];
meta = with lib; {
homepage = "https://incrtcl.sourceforge.net/";
description = "Mega-widget toolkit for incr Tk";
license = licenses.tcltk;
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
mkTclDerivation,
fetchzip,
autoreconfHook,
}:
mkTclDerivation {
pname = "lexec";
version = "0-unstable-2020-03-11";
src = fetchzip {
url = "https://chiselapp.com/user/pooryorick/repository/lexec/tarball/3880618cfe/unnamed-3880618cfe.tar.gz";
hash = "sha256-MHsVcCPjdNn1ca6GFP4jWlDk7zioD0VSEh1CImud4fc=";
};
nativeBuildInputs = [
autoreconfHook
];
meta = {
description = "Implementation of Tcl TIP 424 \"Improving [exec]\" as a separate package";
homepage = "https://chiselapp.com/user/pooryorick/repository/lexec/index";
license = lib.licenses.tcltk;
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
fetchFromGitHub,
mkTclDerivation,
tcllib,
}:
mkTclDerivation rec {
pname = "mustache-tcl";
version = "1.1.3.4";
src = fetchFromGitHub {
owner = "ianka";
repo = "mustache.tcl";
rev = "v${version}";
sha256 = "sha256-apM57LEZ0Y9hXcEPWrKYOoTVtP5QSqiaQrjTHQc3pc4=";
};
buildInputs = [
tcllib
];
unpackPhase = ''
mkdir -p $out/lib/mustache-tcl
cp $src/mustache.tcl $out/lib/mustache-tcl/mustache.tcl
cp $src/pkgIndex.tcl $out/lib/mustache-tcl/pkgIndex.tcl
'';
meta = with lib; {
homepage = "https://github.com/ianka/mustache.tcl";
description = "Tcl implementation of the mustache templating language";
license = licenses.bsd2;
platforms = platforms.all;
maintainers = with maintainers; [ nat-418 ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
mkTclDerivation,
fetchzip,
}:
mkTclDerivation rec {
pname = "pdf4tcl";
version = "0.9.4";
src = fetchzip {
url = "mirror://sourceforge/pdf4tcl/pdf4tcl${lib.replaceStrings [ "." ] [ "" ] version}.tar.gz";
hash = "sha256-lmSt0UQDfUef8S7zevAvvbeWB/vd6jLbKz7Y5A7xJm4=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/lib/pdf4tcl
cp -r * $out/lib/pdf4tcl/
runHook postInstall
'';
meta = {
description = "Tcl package for generating PDF files";
homepage = "https://pdf4tcl.sourceforge.net/";
license = lib.licenses.tcltk;
maintainers = with lib.maintainers; [ fgaz ];
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
tcl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rl_json";
version = "0.15.3";
src = fetchFromGitHub {
owner = "RubyLane";
repo = "rl_json";
rev = finalAttrs.version;
hash = "sha256-JyJBf8lMrO/P5grOMojqs1PRoMPRsPWGQYS33eB7bRI=";
fetchSubmodules = true;
};
nativeBuildInputs = [
autoreconfHook
tcl.tclPackageHook
];
configureFlags = [
"--with-tcl=${tcl}/lib"
"--libdir=${placeholder "out"}/lib"
"--includedir=${placeholder "out"}/include"
"--datarootdir=${placeholder "out"}/share"
];
meta = {
homepage = "https://github.com/RubyLane/rl_json";
description = "Tcl extension for fast json manipulation";
license = lib.licenses.tcltk;
longDescription = ''
Extends Tcl with a json value type and a command to manipulate json values
directly. Similar in spirit to how the dict command manipulates dictionary
values, and comparable in speed.
'';
maintainers = with lib.maintainers; [ fgaz ];
platforms = tcl.meta.platforms;
# From version 0.15.1: 'endian.h' file not found
broken = stdenv.hostPlatform.isDarwin;
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
mkTclDerivation,
tclx,
}:
mkTclDerivation {
pname = "tcl-fcgi";
version = "0.5.0";
src = fetchFromGitHub {
owner = "mpcjanssen";
repo = "tcl-fcgi";
rev = "62452dbf3177ba9458fbb42457834ca77bdf5a82";
sha256 = "sha256-RLuV4ARmGWCJTmhs7DbMWENQGj3d5ZXWb821WrgG0qA=";
};
buildInputs = [
tclx
];
unpackPhase = ''
mkdir -p $out/lib/tcl-fcgi
cp -r $src/tcl-src/* $out/lib/tcl-fcgi/
'';
meta = with lib; {
homepage = "https://github.com/mpcjanssen/tcl-fcgi";
description = "Tcl interface for the FastCGI protocol";
license = licenses.bsd2;
platforms = tclx.meta.platforms;
maintainers = with maintainers; [ nat-418 ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
mkTclDerivation,
fetchFromGitHub,
curl,
}:
mkTclDerivation rec {
pname = "tclcurl";
version = "7.22.1";
src = fetchFromGitHub {
owner = "flightaware";
repo = "tclcurl-fa";
tag = "v${version}";
hash = "sha256-XQuP+SiqvGX3ckBShUxsGBADjV3QdvYpU4hW6LMbMMQ=";
};
buildInputs = [ curl ];
# Uses curl-config
strictDeps = false;
makeFlags = [ "LDFLAGS=-lcurl" ];
meta = {
description = "Curl support in Tcl";
homepage = "https://github.com/flightaware/tclcurl-fa";
changelog = "https://github.com/flightaware/tclcurl-fa/blob/master/ChangeLog.txt";
license = lib.licenses.tcltk;
maintainers = with lib.maintainers; [ fgaz ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
fetchzip,
mkTclDerivation,
critcl,
withCritcl ? true,
}:
mkTclDerivation rec {
pname = "tcllib";
version = "2.0";
src = fetchzip {
url = "mirror://sourceforge/tcllib/tcllib-${version}.tar.gz";
hash = "sha256-LoY6y7p9n1dXk4eSa/HuyA4bIXa0rN7F2OGESk2tROI=";
};
nativeBuildInputs = lib.optional withCritcl critcl;
buildFlags = [ "all" ] ++ lib.optional withCritcl "critcl";
meta = {
homepage = "https://core.tcl-lang.org/tcllib/";
description = "Tcl-only library of standard routines for Tcl";
license = lib.licenses.tcltk;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ fgaz ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
mkTclDerivation,
fetchzip,
graphicsmagick,
tk,
}:
mkTclDerivation rec {
pname = "tclmagick";
version = "1.3.43";
src = fetchzip {
url = "mirror://sourceforge/graphicsmagick/GraphicsMagick-${version}.tar.xz";
hash = "sha256-CpZztiBF0HqH4XWIAyE9IbZVpBcgrDzyASv47wTneQ0=";
};
sourceRoot = src.name + "/TclMagick";
buildInputs = [
graphicsmagick
tk
];
configureFlags = [
"--with-tk=${lib.getLib tk}/lib"
"--with-tkinclude=${lib.getDev tk}/include"
];
doInstallCheck = true;
meta = {
description = "Tcl and Tk Interfaces to GraphicsMagick and ImageMagick";
homepage = "http://www.graphicsmagick.org/TclMagick/doc/";
license = lib.licenses.tcltk;
maintainers = with lib.maintainers; [ fgaz ];
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchFromGitHub,
automake,
autoconf,
libtool,
readline,
mkTclDerivation,
tk,
}:
mkTclDerivation rec {
pname = "tclreadline";
version = "2.4.1";
src = fetchFromGitHub {
owner = "flightaware";
repo = "tclreadline";
rev = "v${version}";
sha256 = "sha256-6FIQJsAm28jPIfNG+7xsMlCJSLw9JStOVzDemw2P+EI=";
};
nativeBuildInputs = [
automake
autoconf
libtool
];
buildInputs = [
readline
tk
];
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
configureFlags = [
"--enable-tclshrl"
"--enable-wishrl"
"--with-tk=${tk}/lib"
"--with-readline-includes=${readline.dev}/include/readline"
"--with-libtool=${libtool}"
];
# The provided makefile leaves a wrong reference to /build/ in RPATH,
# so we fix it after checking that everything is also present in $out
preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
needed_libraries=$(ls .libs | grep '\.\(so\|la\)$')
for lib in $needed_libraries; do
if ! ls $out/lib | grep "$lib"; then
echo "$lib was not installed correctly"
exit 1
fi
done
for executable in $out/bin/{wishrl,tclshrl}; do
patchelf --set-rpath \
"$(patchelf --print-rpath "$executable" | sed "s@$builddir/.libs@$out/lib@")" \
"$executable"
done
'';
meta = with lib; {
description = "GNU readline for interactive tcl shells";
homepage = "https://github.com/flightaware/tclreadline";
license = licenses.bsd3;
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
fetchurl,
mkTclDerivation,
openssl,
}:
mkTclDerivation rec {
pname = "tcltls";
version = "1.7.22";
src = fetchurl {
url = "https://core.tcl-lang.org/tcltls/uv/tcltls-${version}.tar.gz";
sha256 = "sha256-6E4reideyCxKqp0bH5eG2+Q1jIFekXU5/+f2Z/9Lw7Q=";
};
buildInputs = [ openssl ];
configureFlags = [
"--with-ssl-dir=${openssl.dev}"
];
meta = {
homepage = "https://core.tcl-lang.org/tcltls/index";
description = "OpenSSL / RSA-bsafe Tcl extension";
maintainers = [ lib.maintainers.agbrooks ];
license = lib.licenses.tcltk;
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
mkTclDerivation,
fetchfossil,
}:
mkTclDerivation rec {
pname = "tcludp";
version = "1.0.11";
src = fetchfossil {
url = "https://core.tcl-lang.org/tcludp";
rev = "ver_" + lib.replaceStrings [ "." ] [ "_" ] version;
hash = "sha256-PckGwUqL2r5KJEet8sS4U504G63flX84EkQEkQdMifY=";
};
# Add missing pkgIndex.tcl.in
postPatch = ''
test ! -e pkgIndex.tcl.in
cat > pkgIndex.tcl.in <<EOF
package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \
[list load [file join $dir @PKG_LIB_FILE@] @PACKAGE_NAME@]
EOF
'';
# Some tests fail because of the sandbox.
# However, tcltest always returns exit code 0, so this always succeeds.
# https://wuhrr.wordpress.com/2013/09/13/tcltest-part-9-provides-exit-code/
doInstallCheck = true;
installCheckTarget = "test";
meta = {
description = "UDP socket support for Tcl";
homepage = "https://core.tcl-lang.org/tcludp";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fgaz ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
mkTclDerivation,
fetchzip,
}:
mkTclDerivation {
pname = "tclvfs";
version = "1.4-unstable-2023-11-23";
src = fetchzip {
url = "https://core.tcl-lang.org/tclvfs/tarball/8cdab08997fe82d8/tclvfs-8cdab08997fe82d8.tar.gz";
hash = "sha256-DzZ4Puwscbr0KarMyEKeah7jDJy7cfKNBbBSh0boaUw=";
};
meta = {
description = "Tcl extension that exposes Tcl's Virtual File System (VFS) subsystem to the script level";
homepage = "https://core.tcl.tk/tclvfs";
license = lib.licenses.tcltk;
longDescription = ''
The TclVfs project aims to provide an extension to the Tcl language which
allows Virtual Filesystems to be built using Tcl scripts only. It is also
a repository of such Tcl-implemented filesystems (metakit, zip, ftp, tar,
http, webdav, namespace, url)
'';
maintainers = with lib.maintainers; [ fgaz ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
fetchFromGitHub,
mkTclDerivation,
}:
mkTclDerivation rec {
pname = "tclx";
version = "8.6.3";
src = fetchFromGitHub {
owner = "flightaware";
repo = "tclx";
rev = "v${version}";
hash = "sha256-bzLF6qOF9o24joWnGR7B4S+Doj7zv9iTh/mo50iFbUs=";
};
# required in order for tclx to properly detect tclx.tcl at runtime
postInstall =
let
majorMinorVersion = lib.versions.majorMinor version;
in
''
ln -s $prefix/lib/tclx${majorMinorVersion} $prefix/lib/tclx${majorMinorVersion}/tclx${majorMinorVersion}
'';
meta = {
homepage = "https://github.com/flightaware/tclx";
description = "Tcl extensions";
license = lib.licenses.tcltk;
maintainers = with lib.maintainers; [
kovirobi
fgaz
];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
mkTclDerivation,
fetchzip,
expat,
gumbo,
pkg-config,
}:
mkTclDerivation rec {
pname = "tdom";
version = "0.9.6";
src = fetchzip {
url = "http://tdom.org/downloads/tdom-${version}-src.tgz";
hash = "sha256-zN855tb9JQUtcB7K1DeAjUBrqhoNH44KbeHwp3qewqw=";
};
buildInputs = [
expat
gumbo
];
nativeBuildInputs = [ pkg-config ];
configureFlags = [
"--enable-html5"
"--with-expat=${lib.getDev expat}"
];
doInstallCheck = true;
installCheckTarget = "test";
meta = {
description = "XML / DOM / XPath / XSLT / HTML / JSON implementation for Tcl";
homepage = "http://www.tdom.org";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ fgaz ];
};
}

View File

@@ -0,0 +1,49 @@
This is duplicated code from Tk.
It causes errors during build since XLowerWindow is not only a function but also "defined" in tkIntXlibDecls.h.
See
https://github.com/tcltk/tk/blob/71dcaddc69769cbd3e2c4b5edb5810f974579527/generic/tkIntXlibDecls.h#L396
and
https://github.com/tcltk/tk/blob/71dcaddc69769cbd3e2c4b5edb5810f974579527/generic/tkIntXlibDecls.h#L1487
--- a/unix/tixUnixWm.c 2005-03-25 13:15:53.000000000 -0700
+++ b/unix/tixUnixWm.c 2021-03-20 07:31:52.000000000 -0700
@@ -24,38 +24,3 @@
{
return TCL_OK;
}
-
-#ifdef MAC_OSX_TK
-#include "tkInt.h"
-/*
- *----------------------------------------------------------------------
- *
- * XLowerWindow --
- *
- * Change the stacking order of a window.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Changes the stacking order of the specified window.
- *
- *----------------------------------------------------------------------
- */
-
-int
-XLowerWindow(
- Display* display, /* Display. */
- Window window) /* Window. */
-{
- TkWindow *winPtr = *((TkWindow **) window);
-
- display->request++;
- if (Tk_IsTopLevel(winPtr) && !Tk_IsEmbedded(winPtr)) {
- TkWmRestackToplevel(winPtr, Below, NULL);
- } else {
- /* TODO: this should generate damage */
- }
- return 0;
-}
-#endif

View File

@@ -0,0 +1,215 @@
diff -ur a/generic/tixDItem.c b/generic/tixDItem.c
--- a/generic/tixDItem.c 2004-03-27 19:44:56.000000000 -0700
+++ b/generic/tixDItem.c 2023-07-11 14:49:51.583894242 -0600
@@ -30,7 +30,7 @@
Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value,
char *widRec, int offset));
-static char *DItemPrintProc _ANSI_ARGS_((
+static const char *DItemPrintProc _ANSI_ARGS_((
ClientData clientData, Tk_Window tkwin, char *widRec,
int offset, Tcl_FreeProc **freeProcPtr));
@@ -548,7 +548,7 @@
return TCL_OK;
}
-static char *DItemPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+static const char *DItemPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
ClientData clientData;
Tk_Window tkwin;
char *widRec;
diff -ur a/generic/tixDiStyle.c b/generic/tixDiStyle.c
--- a/generic/tixDiStyle.c 2004-03-27 19:44:56.000000000 -0700
+++ b/generic/tixDiStyle.c 2023-07-11 15:02:45.245210252 -0600
@@ -31,7 +31,7 @@
static int DItemStyleParseProc _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
CONST84 char *value,char *widRec, int offset));
-static char * DItemStylePrintProc _ANSI_ARGS_((
+static const char * DItemStylePrintProc _ANSI_ARGS_((
ClientData clientData, Tk_Window tkwin,
char *widRec, int offset,
Tcl_FreeProc **freeProcPtr));
@@ -785,7 +785,7 @@
hashPtr = Tcl_CreateHashEntry(&stylePtr->base.items, (char*)iPtr, &isNew);
if (!isNew) {
- panic("DItem is already associated with style");
+ Tcl_Panic("DItem is already associated with style");
} else {
Tcl_SetHashValue(hashPtr, (char*)iPtr);
}
@@ -801,7 +801,7 @@
hashPtr = Tcl_FindHashEntry(&stylePtr->base.items, (char*)iPtr);
if (hashPtr == NULL) {
- panic("DItem is not associated with style");
+ Tcl_Panic("DItem is not associated with style");
}
Tcl_DeleteHashEntry(hashPtr);
stylePtr->base.refCount--;
@@ -998,7 +998,7 @@
return TCL_ERROR;
}
-static char *DItemStylePrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+static const char *DItemStylePrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
ClientData clientData;
Tk_Window tkwin;
char *widRec;
diff -ur a/generic/tixForm.c b/generic/tixForm.c
--- a/generic/tixForm.c 2004-03-27 19:44:56.000000000 -0700
+++ b/generic/tixForm.c 2023-07-11 14:53:45.695753419 -0600
@@ -802,7 +802,7 @@
* Now set all the client's geometry
*/
if (PlaceAllClients(masterPtr) != TCL_OK) {
- panic("circular dependency");
+ Tcl_Panic("circular dependency");
}
for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
diff -ur a/generic/tixGrData.c b/generic/tixGrData.c
--- a/generic/tixGrData.c 2004-03-27 19:44:56.000000000 -0700
+++ b/generic/tixGrData.c 2023-07-11 14:54:19.644741199 -0600
@@ -296,7 +296,7 @@
Tcl_DeleteHashEntry(cy);
}
else {
- panic("Inconsistent grid dataset: (%d,%d) : %x %x", x, y, cx, cy);
+ Tcl_Panic("Inconsistent grid dataset: (%d,%d) : %x %x", x, y, cx, cy);
}
return 1;
diff -ur a/generic/tixGrid.c b/generic/tixGrid.c
--- a/generic/tixGrid.c 2008-02-27 21:10:43.000000000 -0700
+++ b/generic/tixGrid.c 2023-07-11 14:53:59.283841038 -0600
@@ -831,7 +831,7 @@
* All mapped windows should have been unmapped when the
* the entries were deleted
*/
- panic("tixGrid: mappedWindows not NULL");
+ Tcl_Panic("tixGrid: mappedWindows not NULL");
}
Tk_FreeOptions(configSpecs, (char *) wPtr, wPtr->dispData.display, 0);
diff -ur a/generic/tixHList.c b/generic/tixHList.c
--- a/generic/tixHList.c 2008-02-27 21:05:29.000000000 -0700
+++ b/generic/tixHList.c 2023-07-11 14:55:20.699375202 -0600
@@ -2036,7 +2036,7 @@
break;
}
if (wPtr->headerWin != NULL) {
- panic("HList: header subwindow deleted illegally\n");
+ Tcl_Panic("HList: header subwindow deleted illegally\n");
}
#endif
break;
@@ -2117,7 +2117,7 @@
* All mapped windows should have been unmapped when the
* the entries were deleted
*/
- panic("tixHList: mappedWindows not NULL");
+ Tcl_Panic("tixHList: mappedWindows not NULL");
}
if (wPtr->headerWin) {
wPtr->headerWin = NULL;
diff -ur a/generic/tixImgCmp.c b/generic/tixImgCmp.c
--- a/generic/tixImgCmp.c 2008-02-27 21:05:29.000000000 -0700
+++ b/generic/tixImgCmp.c 2023-07-11 14:59:16.429640785 -0600
@@ -142,8 +142,8 @@
* The type record for bitmap images:
*/
static int ImgCmpCreate _ANSI_ARGS_((Tcl_Interp *interp,
- char *name, int argc, Tcl_Obj *CONST objv[],
- Tk_ImageType *typePtr, Tk_ImageMaster master,
+ const char *name, int argc, Tcl_Obj *CONST objv[],
+ const Tk_ImageType *typePtr, Tk_ImageMaster master,
ClientData *clientDataPtr));
static ClientData ImgCmpGet _ANSI_ARGS_((Tk_Window tkwin,
ClientData clientData));
@@ -378,11 +378,11 @@
ImgCmpCreate(interp, name, argc, objv, typePtr, master, clientDataPtr)
Tcl_Interp *interp; /* Interpreter for application containing
* image. */
- char *name; /* Name to use for image. */
+ const char *name; /* Name to use for image. */
int argc; /* Number of arguments. */
Tcl_Obj *CONST objv[]; /* Argument strings for options (doesn't
* include image name or type). */
- Tk_ImageType *typePtr; /* Pointer to our type record (not used). */
+ const Tk_ImageType *typePtr;/* Pointer to our type record (not used). */
Tk_ImageMaster master; /* Token for image, to be used by us in
* later callbacks. */
ClientData *clientDataPtr; /* Store manager's token for image here;
diff -ur a/generic/tixImgXpm.c b/generic/tixImgXpm.c
--- a/generic/tixImgXpm.c 2023-07-11 15:01:05.887387236 -0600
+++ b/generic/tixImgXpm.c 2023-07-11 15:00:37.209042328 -0600
@@ -22,8 +22,8 @@
*/
static int ImgXpmCreate _ANSI_ARGS_((Tcl_Interp *interp,
- char *name, int argc, Tcl_Obj *CONST objv[],
- Tk_ImageType *typePtr, Tk_ImageMaster master,
+ const char *name, int argc, Tcl_Obj *CONST objv[],
+ const Tk_ImageType *typePtr, Tk_ImageMaster master,
ClientData *clientDataPtr));
static ClientData ImgXpmGet _ANSI_ARGS_((Tk_Window tkwin,
ClientData clientData));
@@ -115,11 +115,11 @@
ImgXpmCreate(interp, name, argc, objv, typePtr, master, clientDataPtr)
Tcl_Interp *interp; /* Interpreter for application containing
* image. */
- char *name; /* Name to use for image. */
+ const char *name; /* Name to use for image. */
int argc; /* Number of arguments. */
Tcl_Obj *CONST objv[]; /* Argument strings for options (doesn't
* include image name or type). */
- Tk_ImageType *typePtr; /* Pointer to our type record (not used). */
+ const Tk_ImageType *typePtr;/* Pointer to our type record (not used). */
Tk_ImageMaster master; /* Token for image, to be used by us in
* later callbacks. */
ClientData *clientDataPtr; /* Store manager's token for image here;
@@ -1213,7 +1213,7 @@
PixmapMaster *masterPtr = (PixmapMaster *) masterData;
if (masterPtr->instancePtr != NULL) {
- panic("tried to delete pixmap image when instances still exist");
+ Tcl_Panic("tried to delete pixmap image when instances still exist");
}
masterPtr->tkMaster = NULL;
if (masterPtr->imageCmd != NULL) {
diff -ur a/generic/tixTList.c b/generic/tixTList.c
--- a/generic/tixTList.c 2008-02-27 21:05:29.000000000 -0700
+++ b/generic/tixTList.c 2023-07-11 14:55:35.960761327 -0600
@@ -1208,7 +1208,7 @@
sprintf(buff, "%d", i);
Tcl_AppendResult(interp, buff, NULL);
} else {
- panic("TList list entry is invalid");
+ Tcl_Panic("TList list entry is invalid");
}
} else {
Tcl_ResetResult(interp);
diff -ur a/generic/tixUtils.c b/generic/tixUtils.c
--- a/generic/tixUtils.c 2008-02-27 21:29:17.000000000 -0700
+++ b/generic/tixUtils.c 2023-07-11 15:01:43.718202631 -0600
@@ -24,7 +24,7 @@
static int ReliefParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value,
char *widRec, int offset);
-static char * ReliefPrintProc(ClientData clientData,
+static const char * ReliefPrintProc(ClientData clientData,
Tk_Window tkwin, char *widRec, int offset,
Tix_FreeProc **freeProcPtr);
@@ -637,7 +637,7 @@
return TCL_ERROR;
}
-static char *
+static const char *
ReliefPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
ClientData clientData;
Tk_Window tkwin;

View File

@@ -0,0 +1,64 @@
{
lib,
fetchurl,
fetchpatch,
tcl,
tk,
}:
tcl.mkTclDerivation {
version = "8.4.3";
pname = "tix";
src = fetchurl {
url = "mirror://sourceforge/tix/tix/8.4.3/Tix8.4.3-src.tar.gz";
sha256 = "1jq3dkyk9mqkj4cg7mdk5r0cclqsby9l2b7wrysi0zk5yw7h8bsn";
};
patches = [
(fetchpatch {
name = "tix-8.4.3-tcl8.5.patch";
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
sha256 = "0wzqmcxxq0rqpnjgxz10spw92yhfygnlwv0h8pcx2ycnqiljz6vj";
})
# Remove duplicated definition of XLowerWindow
./duplicated-xlowerwindow.patch
# Fix incompatible function pointer conversions and implicit definition of `panic`.
# `panic` is just `Tcl_Panic`, but it is not defined on Darwin due to a conflict with `mach/mach.h`.
./fix-clang16.patch
]
++ lib.optional (tcl.release == "8.6") (fetchpatch {
name = "tix-8.4.3-tcl8.6.patch";
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
sha256 = "1jaz0l22xj7x1k4rb9ia6i1psnbwk4pblgq4gfvya7gg7fbb7r36";
});
buildInputs = [ tk ];
# the configure script expects to find the location of the sources of
# tcl and tk in {tcl,tk}Config.sh
# In fact, it only needs some private headers. We copy them in
# the private_headers folders and trick the configure script into believing
# the sources are here.
preConfigure = ''
mkdir -p private_headers/generic
< ${tcl}/lib/tclConfig.sh sed "s@TCL_SRC_DIR=.*@TCL_SRC_DIR=private_headers@" > tclConfig.sh
< ${tk}/lib/tkConfig.sh sed "s@TK_SRC_DIR=.*@TK_SRC_DIR=private_headers@" > tkConfig.sh
for i in ${tcl}/include/* ${tk.dev}/include/*; do
ln -s $i private_headers/generic;
done;
'';
addTclConfigureFlags = false;
configureFlags = [
"--with-tclconfig=."
"--with-tkinclude=${tk.dev}/include"
"--with-tkconfig=."
"--libdir=\${prefix}/lib"
];
meta = with lib; {
description = "Widget library for Tcl/Tk";
homepage = "https://tix.sourceforge.net/";
platforms = platforms.all;
license = with licenses; [
bsd2 # tix
gpl2 # patches from portage
];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
fetchsvn,
tcl,
tcllib,
tk,
xorg,
}:
tcl.mkTclDerivation rec {
pname = "tkimg";
version = "623";
src = fetchsvn {
url = "svn://svn.code.sf.net/p/tkimg/code/trunk";
rev = version;
sha256 = "sha256-6GlkqYxXmMGjiJTZS2fQNVSimcKc1BZ/lvzvtkhty+o=";
};
configureFlags = [
"--with-tcl=${tcl}/lib"
"--with-tk=${tk}/lib"
"--with-tkinclude=${tk.dev}/include"
];
buildInputs = [
xorg.libX11
tcllib
];
meta = {
homepage = "https://sourceforge.net/projects/tkimg/";
description = "Img package adds several image formats to Tcl/Tk";
maintainers = with lib.maintainers; [ matthewcroughan ];
license = lib.licenses.bsd3;
platforms = lib.platforms.unix;
badPlatforms = lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
fetchurl,
mkTclDerivation,
}:
mkTclDerivation {
pname = "wapp";
version = "0-unstable-2024-11-22";
src = fetchurl {
url = "https://wapp.tcl-lang.org/home/raw/3b1ce7c0234b4b2750deadc80f524ed28e835aa5e741bf3fe63b416a16a55699?at=wapp.tcl";
hash = "sha256-0e9yTVFYj1tYGU7EiXRPw35qfDzckzz4i3RV/8TttGw=";
};
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out/lib/wapp
cp $src $out/lib/wapp/wapp.tcl
cat <<EOF > $out/lib/wapp/pkgIndex.tcl
package ifneeded wapp 1.0 [list source [file join \$dir wapp.tcl]]
EOF
runHook postInstall
'';
meta = with lib; {
homepage = "https://wapp.tcl-lang.org/home/doc/trunk/README.md";
description = "Framework for writing web applications in Tcl";
license = licenses.bsd2;
maintainers = with maintainers; [ nat-418 ];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
mkTclDerivation,
fetchFromGitHub,
tcllib,
nix-update-script,
}:
mkTclDerivation rec {
pname = "zesty";
version = "0.2";
src = fetchFromGitHub {
owner = "nico-robert";
repo = "zesty";
tag = "v${version}";
hash = "sha256-1K3E9rQAXEXegLjp2mZTzwyDXq3lMpDr0DB4I+ACH08=";
};
propagatedBuildInputs = [
tcllib
];
installPhase = ''
runHook preInstall
install -Dm644 -t $out/lib/zesty/ *.tcl
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Tcl library for rich terminal output";
homepage = "https://github.com/nico-robert/zesty";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
fetchFromGitHub,
mkTclDerivation,
tcl,
tcllib,
}:
mkTclDerivation rec {
pname = "critcl";
version = "3.3.1";
src = fetchFromGitHub {
owner = "andreas-kupries";
repo = "critcl";
rev = version;
hash = "sha256-LBTAuwTrvwj42vo/TXVSUK8euxHgvSLai23e1jmhMso=";
};
buildInputs = [
tcl
tcllib
];
dontBuild = true;
doCheck = true;
checkPhase = ''
runHook preInstall
HOME="$(mktemp -d)" tclsh ./build.tcl test
runHook postInstall
'';
installPhase = ''
runHook preInstall
tclsh ./build.tcl install --prefix $out
runHook postInstall
'';
meta = with lib; {
description = "Easily embed C code in Tcl";
homepage = "https://andreas-kupries.github.io/critcl/";
license = licenses.tcltk;
mainProgram = "critcl";
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
mkTclDerivation,
fetchzip,
pkg-config,
dbus,
}:
mkTclDerivation rec {
pname = "dbus";
version = "4.1";
src = fetchzip {
url = "https://chiselapp.com/user/schelte/repository/dbus/uv/dbus-${version}.tar.gz";
hash = "sha256-8VIw475Q9kRh6UV6FxWCXKLKasqM1z58ed0rMgzEX3I=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
dbus
];
meta = {
description = "DBus bindings for Tcl";
homepage = "https://chiselapp.com/user/schelte/repository/dbus/home";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fgaz ];
};
}