diff --git a/.github/labeler.yml b/.github/labeler.yml index 485bcce6a8a4d..1d70faf6423b2 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -340,6 +340,15 @@ - pkgs/os-specific/linux/systemd/**/* - nixos/modules/system/boot/systemd*/**/* +"6.topic: tcl": + - any: + - changed-files: + - any-glob-to-any-file: + - doc/languages-frameworks/tcl.section.md + - pkgs/development/interpreters/tcl/* + - pkgs/development/tcl-modules/**/* + - pkgs/top-level/tcl-packages.nix + "6.topic: TeX": - any: - changed-files: diff --git a/ci/OWNERS b/ci/OWNERS index f382f20e31290..5f82eac092ce0 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -177,6 +177,13 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @NixOS/nix-team @raitobeza /pkgs/build-support/rust @zowoq @winterqt @figsoda /doc/languages-frameworks/rust.section.md @zowoq @winterqt @figsoda +# Tcl +/pkgs/development/interpreters/tcl @fgaz +/pkgs/development/libraries/tk @fgaz +/pkgs/top-level/tcl-packages.nix @fgaz +/pkgs/development/tcl-modules @fgaz +/doc/languages-frameworks/tcl.section.md @fgaz + # C compilers /pkgs/development/compilers/gcc /pkgs/development/compilers/llvm @alyssais @RossComputerGuy @NixOS/llvm diff --git a/doc/languages-frameworks/index.md b/doc/languages-frameworks/index.md index c21f73e69a259..a8a13ce5b9e29 100644 --- a/doc/languages-frameworks/index.md +++ b/doc/languages-frameworks/index.md @@ -93,6 +93,7 @@ ruby.section.md rust.section.md scheme.section.md swift.section.md +tcl.section.md texlive.section.md titanium.section.md vim.section.md diff --git a/doc/languages-frameworks/tcl.section.md b/doc/languages-frameworks/tcl.section.md new file mode 100644 index 0000000000000..71ec9d89eb501 --- /dev/null +++ b/doc/languages-frameworks/tcl.section.md @@ -0,0 +1,54 @@ +# Tcl {#sec-language-tcl} + +## User guide {#sec-language-tcl-user-guide} + +Tcl interpreters are available under the `tcl` and `tcl-X_Y` attributes, where `X_Y` is the Tcl version. + +Tcl libraries are available in the `tclPackages` attribute set. +They are only guaranteed to work with the default Tcl version, but will probably also work with others thanks to the [stubs mechanism](https://wiki.tcl-lang.org/page/Stubs). + +## Packaging guide {#sec-language-tcl-packaging} + +Tcl packages are typically built with `tclPackages.mkTclDerivation`. +Tcl dependencies go in `buildInputs`/`nativeBuildInputs`/... like other packages. +For more complex package definitions, such as packages with mixed languages, use `tcl.tclPackageHook`. + +Where possible, make sure to enable stubs for maximum compatibility, usually with the `--enable-stubs` configure flag. + +Here is a simple package example to be called with `tclPackages.callPackage`. + +``` +{ lib, fetchzip, mkTclDerivation, openssl }: + +mkTclDerivation rec { + pname = "tcltls"; + version = "1.7.22"; + + src = fetchzip { + url = "https://core.tcl-lang.org/tcltls/uv/tcltls-${version}.tar.gz"; + hash = "sha256-TOouWcQc3MNyJtaAGUGbaQoaCWVe6g3BPERct/V65vk="; + }; + + buildInputs = [ openssl ]; + + configureFlags = [ + "--with-ssl-dir=${openssl.dev}" + "--enable-stubs" + ]; + + 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; + }; +} +``` + +All Tcl libraries are declared in `pkgs/top-level/tcl-packages.nix` and are defined in `pkgs/development/tcl-modules/`. +If possible, prefer the by-name hierarchy in `pkgs/development/tcl-modules/by-name/`. +Its use is documented in `pkgs/development/tcl-modules/by-name/README.md`. + +All Tcl applications reside elsewhere. +In case a package is used as both a library and an application (for example `expect`), it should be defined in `tcl-packages.nix`, with an alias elsewhere. diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index df940e90ff943..1874a3b336f47 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -384,6 +384,8 @@ `nodePackages.coc-eslint` and `vimPlugins.coc-eslint` packages offer comparable features for `eslint`, which replaced `tslint`. +- Tcl packages have been moved into the `tclPackages` scope. + - `teleport` has been upgraded from major version 15 to major version 16. Refer to upstream [upgrade instructions](https://goteleport.com/docs/management/operations/upgrading/) and [release notes for v16](https://goteleport.com/docs/changelog/#1600-061324). diff --git a/pkgs/applications/misc/therion/default.nix b/pkgs/applications/misc/therion/default.nix index fbe734ddc1b63..3dd72b9f6829a 100644 --- a/pkgs/applications/misc/therion/default.nix +++ b/pkgs/applications/misc/therion/default.nix @@ -5,10 +5,9 @@ , pkg-config , perl , tcl -, tcllib +, tclPackages , tk , expat -, bwidget , python3 , texliveTeTeX , survex @@ -25,7 +24,6 @@ , sqlite , libtiff , curl -, tkimg }: stdenv.mkDerivation rec { @@ -59,7 +57,7 @@ stdenv.mkDerivation rec { buildInputs = [ expat - tkimg + tclPackages.tkimg proj wxGTK32 vtk @@ -74,8 +72,8 @@ stdenv.mkDerivation rec { curl fmt tcl - tcllib - bwidget + tclPackages.tcllib + tclPackages.bwidget ]; fixupPhase = '' diff --git a/pkgs/applications/science/electronics/openroad/default.nix b/pkgs/applications/science/electronics/openroad/default.nix index 65bf094c2a2c1..cae21d7bba4b9 100644 --- a/pkgs/applications/science/electronics/openroad/default.nix +++ b/pkgs/applications/science/electronics/openroad/default.nix @@ -26,7 +26,7 @@ , readline , spdlog , tcl -, tcllib +, tclPackages , xorg , yosys , zlib @@ -72,7 +72,7 @@ mkDerivation rec { readline spdlog tcl - tcllib + tclPackages.tcllib yosys xorg.libX11 zlib diff --git a/pkgs/applications/version-management/fossil/default.nix b/pkgs/applications/version-management/fossil/default.nix index a00cc8e78cc7e..77658b58f2603 100644 --- a/pkgs/applications/version-management/fossil/default.nix +++ b/pkgs/applications/version-management/fossil/default.nix @@ -12,7 +12,7 @@ , sqlite , ed , which -, tcllib +, tclPackages , withJson ? true }: @@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { # required for build time tool `./tools/translate.c` depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ installShellFiles tcl tcllib ]; + nativeBuildInputs = [ installShellFiles tcl tclPackages.tcllib ]; buildInputs = [ zlib openssl readline which ed ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv diff --git a/pkgs/by-name/em/emacspeak/package.nix b/pkgs/by-name/em/emacspeak/package.nix index 6c18af7807ea9..3e9b753be9641 100644 --- a/pkgs/by-name/em/emacspeak/package.nix +++ b/pkgs/by-name/em/emacspeak/package.nix @@ -5,7 +5,7 @@ , makeWrapper , stdenv , tcl -, tclx +, tclPackages }: stdenv.mkDerivation (finalAttrs: { @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ espeak-ng tcl - tclx + tclPackages.tclx ]; strictDeps = true; @@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: { find "$d" -type f -not -executable -execdir chmod 644 {} + makeWrapper ${lib.getExe emacs} $out/bin/emacspeak \ --set DTK_PROGRAM "${placeholder "out"}/share/emacs/site-lisp/emacspeak/servers/espeak" \ - --set TCLLIBPATH "${tclx}/lib" \ + --set TCLLIBPATH "${tclPackages.tclx}/lib" \ --add-flags '-l "${placeholder "out"}/share/emacs/site-lisp/emacspeak/lisp/emacspeak-setup.elc"' ''; diff --git a/pkgs/by-name/ke/keydb/package.nix b/pkgs/by-name/ke/keydb/package.nix index 265f8a884fcb6..ed6ba8bd518ca 100644 --- a/pkgs/by-name/ke/keydb/package.nix +++ b/pkgs/by-name/ke/keydb/package.nix @@ -12,7 +12,7 @@ jemalloc, which, tcl, - tcltls, + tclPackages, ps, getconf, nixosTests, @@ -60,11 +60,14 @@ stdenv.mkDerivation (finalAttrs: { # darwin currently lacks a pure `pgrep` which is extensively used here doCheck = !stdenv.hostPlatform.isDarwin; - nativeCheckInputs = [ - which - tcl - ps - ] ++ lib.optionals stdenv.hostPlatform.isStatic [ getconf ] ++ lib.optionals tlsSupport [ tcltls ]; + nativeCheckInputs = + [ + which + tcl + ps + ] + ++ lib.optionals stdenv.hostPlatform.isStatic [ getconf ] + ++ lib.optionals tlsSupport [ tclPackages.tcltls ]; checkPhase = '' runHook preCheck diff --git a/pkgs/by-name/re/remind/package.nix b/pkgs/by-name/re/remind/package.nix index bbeadc7773cd3..eb01ac3c885d1 100644 --- a/pkgs/by-name/re/remind/package.nix +++ b/pkgs/by-name/re/remind/package.nix @@ -3,7 +3,7 @@ stdenv, fetchurl, tk, - tcllib, + tclPackages, tcl, tkremind ? null, withGui ? @@ -23,7 +23,7 @@ tcl.mkTclDerivation rec { }; propagatedBuildInputs = lib.optionals withGui [ - tcllib + tclPackages.tcllib tk ]; diff --git a/pkgs/by-name/xf/xfs-undelete/package.nix b/pkgs/by-name/xf/xfs-undelete/package.nix index 390a19d1f06c0..030f3324fc59c 100644 --- a/pkgs/by-name/xf/xfs-undelete/package.nix +++ b/pkgs/by-name/xf/xfs-undelete/package.nix @@ -4,7 +4,7 @@ , makeWrapper , coreutils , tcl-8_6 -, tcllib +, tclPackages , installShellFiles }: @@ -19,7 +19,7 @@ stdenv.mkDerivation { hash = "sha256-ENa/r3+o7abW8iun6V/2LhTVmFVSwVM6v46KXBcKJ1g="; }; - buildInputs = [ tcl-8_6 tcllib coreutils ]; + buildInputs = [ tcl-8_6 tclPackages.tcllib coreutils ]; nativeBuildInputs = [ makeWrapper tcl-8_6.tclPackageHook installShellFiles ]; tclWrapperArgs = [ "--prefix" "PATH" ":" (lib.makeBinPath [ tcl-8_6 ]) ]; diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index abb66b38e3cc3..4d8e03695de32 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -8,7 +8,7 @@ , openssl , readline , sqlite -, tcl ? null, tk ? null, tix ? null, libX11 ? null, x11Support ? false +, tcl ? null, tk ? null, tclPackages, libX11 ? null, x11Support ? false , zlib , self , configd, coreutils @@ -273,8 +273,8 @@ in with passthru; stdenv.mkDerivation ({ setupHook = python-setup-hook sitePackages; - postPatch = lib.optionalString (x11Support && (tix != null)) '' - substituteInPlace "Lib/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'" + postPatch = lib.optionalString (x11Support && ((tclPackages.tix or null) != null)) '' + substituteInPlace "Lib/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tclPackages.tix}/lib'" ''; postInstall = diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 37764506e2964..32f27a2421259 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -35,7 +35,7 @@ , tzdata , withGdbm ? !stdenv.hostPlatform.isWindows, gdbm , withReadline ? !stdenv.hostPlatform.isWindows, readline -, x11Support ? false, tcl, tk, tix, libX11, xorgproto +, x11Support ? false, tcl, tk, tclPackages, libX11, xorgproto # splicing/cross , pythonAttr ? "python${sourceVersion.major}${sourceVersion.minor}" @@ -323,10 +323,10 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { '' + optionalString mimetypesSupport '' substituteInPlace Lib/mimetypes.py \ --replace-fail "@mime-types@" "${mailcap}" - '' + optionalString (pythonOlder "3.13" && x11Support && (tix != null)) '' + '' + optionalString (pythonOlder "3.13" && x11Support && ((tclPackages.tix or null) != null)) '' substituteInPlace "Lib/tkinter/tix.py" --replace-fail \ "os.environ.get('TIX_LIBRARY')" \ - "os.environ.get('TIX_LIBRARY') or '${tix}/lib'" + "os.environ.get('TIX_LIBRARY') or '${tclPackages.tix}/lib'" ''; env = { diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index 3dcbce42cf0a6..4e8199af56b34 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, substituteAll, fetchurl , zlibSupport ? true, zlib , bzip2, pkg-config, libffi, libunwind, Security -, sqlite, openssl, ncurses, python, expat, tcl, tk, tix, libX11 +, sqlite, openssl, ncurses, python, expat, tcl, tk, tclPackages, libX11 , gdbm, db, xz, python-setup-hook , optimizationLevel ? "jit", boehmgc # For the Python package set @@ -98,7 +98,7 @@ in with passthru; stdenv.mkDerivation rec { --replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES" substituteInPlace "lib-python/${if isPy3k then "3/tkinter/tix.py" else "2.7/lib-tk/Tix.py"}" \ - --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'" + --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tclPackages.tix}/lib'" ''; buildPhase = '' diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index d17cf9941491a..708192d930caf 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -474,7 +474,7 @@ let RMySQL = with pkgs; [ zlib libmysqlclient openssl.dev ]; RNetCDF = with pkgs; [ netcdf udunits ]; RODBC = [ pkgs.libiodbc ]; - rpanel = [ pkgs.bwidget ]; + rpanel = [ pkgs.tclPackages.bwidget ]; Rpoppler = [ pkgs.poppler ]; RPostgres = with pkgs; [ postgresql ]; RPostgreSQL = with pkgs; [ postgresql postgresql ]; @@ -1460,9 +1460,9 @@ let rpanel = old.rpanel.overrideAttrs (attrs: { preConfigure = '' - export TCLLIBPATH="${pkgs.bwidget}/lib/bwidget${pkgs.bwidget.version}" + export TCLLIBPATH="${pkgs.tclPackages.bwidget}/lib/bwidget${pkgs.tclPackages.bwidget.version}" ''; - TCLLIBPATH = "${pkgs.bwidget}/lib/bwidget${pkgs.bwidget.version}"; + TCLLIBPATH = "${pkgs.tclPackages.bwidget}/lib/bwidget${pkgs.tclPackages.bwidget.version}"; }); networkscaleup = old.networkscaleup.overrideAttrs (attrs: { diff --git a/pkgs/development/tcl-modules/by-name/README.md b/pkgs/development/tcl-modules/by-name/README.md new file mode 100644 index 0000000000000..c65310524c1c1 --- /dev/null +++ b/pkgs/development/tcl-modules/by-name/README.md @@ -0,0 +1,17 @@ +# 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 { + # ... +} +``` diff --git a/pkgs/development/libraries/bwidget/default.nix b/pkgs/development/tcl-modules/by-name/bw/bwidget/package.nix similarity index 91% rename from pkgs/development/libraries/bwidget/default.nix rename to pkgs/development/tcl-modules/by-name/bw/bwidget/package.nix index 8a408864c5823..161324f9e6e0e 100644 --- a/pkgs/development/libraries/bwidget/default.nix +++ b/pkgs/development/tcl-modules/by-name/bw/bwidget/package.nix @@ -1,6 +1,6 @@ -{ lib, fetchurl, tcl, tk }: +{ lib, fetchurl, mkTclDerivation, tk }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "bwidget"; version = "1.10.0"; diff --git a/pkgs/tools/misc/expect/0004-enable-cross-compilation.patch b/pkgs/development/tcl-modules/by-name/ex/expect/0004-enable-cross-compilation.patch similarity index 100% rename from pkgs/tools/misc/expect/0004-enable-cross-compilation.patch rename to pkgs/development/tcl-modules/by-name/ex/expect/0004-enable-cross-compilation.patch diff --git a/pkgs/tools/misc/expect/fix-build-time-run-tcl.patch b/pkgs/development/tcl-modules/by-name/ex/expect/fix-build-time-run-tcl.patch similarity index 100% rename from pkgs/tools/misc/expect/fix-build-time-run-tcl.patch rename to pkgs/development/tcl-modules/by-name/ex/expect/fix-build-time-run-tcl.patch diff --git a/pkgs/tools/misc/expect/fix-darwin-bsd-clang16.patch b/pkgs/development/tcl-modules/by-name/ex/expect/fix-darwin-bsd-clang16.patch similarity index 100% rename from pkgs/tools/misc/expect/fix-darwin-bsd-clang16.patch rename to pkgs/development/tcl-modules/by-name/ex/expect/fix-darwin-bsd-clang16.patch diff --git a/pkgs/tools/misc/expect/freebsd-unversioned.patch b/pkgs/development/tcl-modules/by-name/ex/expect/freebsd-unversioned.patch similarity index 100% rename from pkgs/tools/misc/expect/freebsd-unversioned.patch rename to pkgs/development/tcl-modules/by-name/ex/expect/freebsd-unversioned.patch diff --git a/pkgs/tools/misc/expect/default.nix b/pkgs/development/tcl-modules/by-name/ex/expect/package.nix similarity index 100% rename from pkgs/tools/misc/expect/default.nix rename to pkgs/development/tcl-modules/by-name/ex/expect/package.nix diff --git a/pkgs/development/libraries/incrtcl/default.nix b/pkgs/development/tcl-modules/by-name/in/incrtcl/package.nix similarity index 92% rename from pkgs/development/libraries/incrtcl/default.nix rename to pkgs/development/tcl-modules/by-name/in/incrtcl/package.nix index 4558ebbd0dcf8..7b1397ac1bb8e 100644 --- a/pkgs/development/libraries/incrtcl/default.nix +++ b/pkgs/development/tcl-modules/by-name/in/incrtcl/package.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchurl, writeText, tcl }: +{ lib, stdenv, mkTclDerivation, fetchurl, writeText, tcl }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "incrtcl"; version = "4.2.3"; diff --git a/pkgs/development/libraries/itktcl/default.nix b/pkgs/development/tcl-modules/by-name/it/itktcl/package.nix similarity index 92% rename from pkgs/development/libraries/itktcl/default.nix rename to pkgs/development/tcl-modules/by-name/it/itktcl/package.nix index b6a4788075f70..aefefa8c3cebd 100644 --- a/pkgs/development/libraries/itktcl/default.nix +++ b/pkgs/development/tcl-modules/by-name/it/itktcl/package.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchurl, tcl, tk, incrtcl }: +{ lib, stdenv, fetchurl, mkTclDerivation, tk, incrtcl }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "itk-tcl"; version = "4.1.0"; diff --git a/pkgs/development/libraries/mustache-tcl/default.nix b/pkgs/development/tcl-modules/by-name/mu/mustache-tcl/package.nix similarity index 90% rename from pkgs/development/libraries/mustache-tcl/default.nix rename to pkgs/development/tcl-modules/by-name/mu/mustache-tcl/package.nix index 063c8ea36f71e..5281f40a78e8e 100644 --- a/pkgs/development/libraries/mustache-tcl/default.nix +++ b/pkgs/development/tcl-modules/by-name/mu/mustache-tcl/package.nix @@ -1,6 +1,6 @@ -{ lib, fetchFromGitHub, tcl, tcllib }: +{ lib, fetchFromGitHub, mkTclDerivation, tcllib }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "mustache-tcl"; version = "1.1.3.4"; diff --git a/pkgs/by-name/pd/pdf4tcl/package.nix b/pkgs/development/tcl-modules/by-name/pd/pdf4tcl/package.nix similarity index 93% rename from pkgs/by-name/pd/pdf4tcl/package.nix rename to pkgs/development/tcl-modules/by-name/pd/pdf4tcl/package.nix index 94ba20ebd7423..07d059c042d32 100644 --- a/pkgs/by-name/pd/pdf4tcl/package.nix +++ b/pkgs/development/tcl-modules/by-name/pd/pdf4tcl/package.nix @@ -1,10 +1,10 @@ { lib, - tcl, + mkTclDerivation, fetchzip, }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "pdf4tcl"; version = "0.9.4"; diff --git a/pkgs/development/libraries/tcl-fcgi/default.nix b/pkgs/development/tcl-modules/by-name/tc/tcl-fcgi/package.nix similarity index 90% rename from pkgs/development/libraries/tcl-fcgi/default.nix rename to pkgs/development/tcl-modules/by-name/tc/tcl-fcgi/package.nix index 5451c5186a4ee..49d23ddd9a724 100644 --- a/pkgs/development/libraries/tcl-fcgi/default.nix +++ b/pkgs/development/tcl-modules/by-name/tc/tcl-fcgi/package.nix @@ -1,6 +1,6 @@ -{ lib, fetchFromGitHub, tcl, tclx }: +{ lib, fetchFromGitHub, mkTclDerivation, tclx }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "tcl-fcgi"; version = "0.5.0"; diff --git a/pkgs/by-name/tc/tclcurl/package.nix b/pkgs/development/tcl-modules/by-name/tc/tclcurl/package.nix similarity index 94% rename from pkgs/by-name/tc/tclcurl/package.nix rename to pkgs/development/tcl-modules/by-name/tc/tclcurl/package.nix index 2bcfef25a3bd0..9e967de825bc1 100644 --- a/pkgs/by-name/tc/tclcurl/package.nix +++ b/pkgs/development/tcl-modules/by-name/tc/tclcurl/package.nix @@ -1,11 +1,11 @@ { lib, - tcl, + mkTclDerivation, fetchFromGitHub, curl, }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "tclcurl"; version = "7.22.1"; diff --git a/pkgs/development/libraries/tcllib/default.nix b/pkgs/development/tcl-modules/by-name/tc/tcllib/package.nix similarity index 93% rename from pkgs/development/libraries/tcllib/default.nix rename to pkgs/development/tcl-modules/by-name/tc/tcllib/package.nix index a5bfba8b05599..8ec83df8b6edb 100644 --- a/pkgs/development/libraries/tcllib/default.nix +++ b/pkgs/development/tcl-modules/by-name/tc/tcllib/package.nix @@ -1,11 +1,11 @@ { lib , fetchzip -, tcl +, mkTclDerivation , critcl , withCritcl ? true }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "tcllib"; version = "1.21"; diff --git a/pkgs/by-name/tc/tclmagick/package.nix b/pkgs/development/tcl-modules/by-name/tc/tclmagick/package.nix similarity index 94% rename from pkgs/by-name/tc/tclmagick/package.nix rename to pkgs/development/tcl-modules/by-name/tc/tclmagick/package.nix index f5d0bc4b152fc..ad688ec56de4c 100644 --- a/pkgs/by-name/tc/tclmagick/package.nix +++ b/pkgs/development/tcl-modules/by-name/tc/tclmagick/package.nix @@ -1,12 +1,12 @@ { lib, - tcl, + mkTclDerivation, fetchzip, graphicsmagick, tk, }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "tclmagick"; version = "1.3.43"; diff --git a/pkgs/development/interpreters/tclreadline/default.nix b/pkgs/development/tcl-modules/by-name/tc/tclreadline/package.nix similarity index 97% rename from pkgs/development/interpreters/tclreadline/default.nix rename to pkgs/development/tcl-modules/by-name/tc/tclreadline/package.nix index 57f7f9a7b1940..62880ee5323a6 100644 --- a/pkgs/development/interpreters/tclreadline/default.nix +++ b/pkgs/development/tcl-modules/by-name/tc/tclreadline/package.nix @@ -4,11 +4,11 @@ , autoconf , libtool , readline -, tcl +, mkTclDerivation , tk }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "tclreadline"; version = "2.4.0"; diff --git a/pkgs/development/libraries/tcltls/default.nix b/pkgs/development/tcl-modules/by-name/tc/tcltls/package.nix similarity index 89% rename from pkgs/development/libraries/tcltls/default.nix rename to pkgs/development/tcl-modules/by-name/tc/tcltls/package.nix index dbc095b64e0ba..cb32bf4a7ba8e 100644 --- a/pkgs/development/libraries/tcltls/default.nix +++ b/pkgs/development/tcl-modules/by-name/tc/tcltls/package.nix @@ -1,6 +1,6 @@ -{ lib, fetchurl, tcl, openssl }: +{ lib, fetchurl, mkTclDerivation, openssl }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "tcltls"; version = "1.7.22"; diff --git a/pkgs/by-name/tc/tcludp/package.nix b/pkgs/development/tcl-modules/by-name/tc/tcludp/package.nix similarity index 95% rename from pkgs/by-name/tc/tcludp/package.nix rename to pkgs/development/tcl-modules/by-name/tc/tcludp/package.nix index 890b0d4366fce..073a93432fda2 100644 --- a/pkgs/by-name/tc/tcludp/package.nix +++ b/pkgs/development/tcl-modules/by-name/tc/tcludp/package.nix @@ -1,10 +1,10 @@ { lib, - tcl, + mkTclDerivation, fetchfossil, }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "tcludp"; version = "1.0.11"; diff --git a/pkgs/by-name/tc/tclvfs/package.nix b/pkgs/development/tcl-modules/by-name/tc/tclvfs/package.nix similarity index 95% rename from pkgs/by-name/tc/tclvfs/package.nix rename to pkgs/development/tcl-modules/by-name/tc/tclvfs/package.nix index 9ac69b5bb1537..0fde102cc2a72 100644 --- a/pkgs/by-name/tc/tclvfs/package.nix +++ b/pkgs/development/tcl-modules/by-name/tc/tclvfs/package.nix @@ -1,10 +1,10 @@ { lib, - tcl, + mkTclDerivation, fetchzip, }: -tcl.mkTclDerivation { +mkTclDerivation { pname = "tclvfs"; version = "1.4-unstable-2023-11-23"; diff --git a/pkgs/development/libraries/tclx/default.nix b/pkgs/development/tcl-modules/by-name/tc/tclx/package.nix similarity index 94% rename from pkgs/development/libraries/tclx/default.nix rename to pkgs/development/tcl-modules/by-name/tc/tclx/package.nix index 5e3a73febe9b8..8ed3bb6f5931c 100644 --- a/pkgs/development/libraries/tclx/default.nix +++ b/pkgs/development/tcl-modules/by-name/tc/tclx/package.nix @@ -1,9 +1,9 @@ { lib , fetchFromGitHub -, tcl +, mkTclDerivation }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "tclx"; version = "8.6.3"; diff --git a/pkgs/by-name/td/tdom/package.nix b/pkgs/development/tcl-modules/by-name/td/tdom/package.nix similarity index 94% rename from pkgs/by-name/td/tdom/package.nix rename to pkgs/development/tcl-modules/by-name/td/tdom/package.nix index a9b96c8d940a4..38ac7acfbcf0d 100644 --- a/pkgs/by-name/td/tdom/package.nix +++ b/pkgs/development/tcl-modules/by-name/td/tdom/package.nix @@ -1,13 +1,13 @@ { lib, - tcl, + mkTclDerivation, fetchzip, expat, gumbo, pkg-config, }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "tdom"; version = "0.9.5"; diff --git a/pkgs/development/libraries/tix/duplicated-xlowerwindow.patch b/pkgs/development/tcl-modules/by-name/ti/tix/duplicated-xlowerwindow.patch similarity index 100% rename from pkgs/development/libraries/tix/duplicated-xlowerwindow.patch rename to pkgs/development/tcl-modules/by-name/ti/tix/duplicated-xlowerwindow.patch diff --git a/pkgs/development/libraries/tix/fix-clang16.patch b/pkgs/development/tcl-modules/by-name/ti/tix/fix-clang16.patch similarity index 100% rename from pkgs/development/libraries/tix/fix-clang16.patch rename to pkgs/development/tcl-modules/by-name/ti/tix/fix-clang16.patch diff --git a/pkgs/development/libraries/tix/default.nix b/pkgs/development/tcl-modules/by-name/ti/tix/package.nix similarity index 100% rename from pkgs/development/libraries/tix/default.nix rename to pkgs/development/tcl-modules/by-name/ti/tix/package.nix diff --git a/pkgs/development/libraries/tkimg/default.nix b/pkgs/development/tcl-modules/by-name/tk/tkimg/package.nix similarity index 100% rename from pkgs/development/libraries/tkimg/default.nix rename to pkgs/development/tcl-modules/by-name/tk/tkimg/package.nix diff --git a/pkgs/development/libraries/wapp/default.nix b/pkgs/development/tcl-modules/by-name/wa/wapp/package.nix similarity index 93% rename from pkgs/development/libraries/wapp/default.nix rename to pkgs/development/tcl-modules/by-name/wa/wapp/package.nix index 9543b49af3b9a..fc7e14205f9fc 100644 --- a/pkgs/development/libraries/wapp/default.nix +++ b/pkgs/development/tcl-modules/by-name/wa/wapp/package.nix @@ -1,6 +1,6 @@ -{ lib, fetchurl, tcl }: +{ lib, fetchurl, mkTclDerivation }: -tcl.mkTclDerivation { +mkTclDerivation { pname = "wapp"; version = "0-unstable-2024-05-23"; diff --git a/pkgs/development/compilers/critcl/default.nix b/pkgs/development/tcl-modules/critcl/default.nix similarity index 95% rename from pkgs/development/compilers/critcl/default.nix rename to pkgs/development/tcl-modules/critcl/default.nix index 5caf63d9dba64..4dda4292eb640 100644 --- a/pkgs/development/compilers/critcl/default.nix +++ b/pkgs/development/tcl-modules/critcl/default.nix @@ -1,10 +1,11 @@ { lib , fetchFromGitHub +, mkTclDerivation , tcl , tcllib }: -tcl.mkTclDerivation rec { +mkTclDerivation rec { pname = "critcl"; version = "3.2"; diff --git a/pkgs/development/tools/nagelfar/default.nix b/pkgs/development/tools/nagelfar/default.nix index a40861e0988d4..3e379875c4c51 100644 --- a/pkgs/development/tools/nagelfar/default.nix +++ b/pkgs/development/tools/nagelfar/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchzip, tcl, tcllib, tk, }: +{ lib, fetchzip, tcl, tclPackages, tk, }: tcl.mkTclDerivation { pname = "nagelfar"; @@ -11,7 +11,7 @@ tcl.mkTclDerivation { buildInputs = [ tcl - tcllib + tclPackages.tcllib tk ]; diff --git a/pkgs/games/tcl2048/default.nix b/pkgs/games/tcl2048/default.nix index c28c259580387..1435e1ed76e48 100644 --- a/pkgs/games/tcl2048/default.nix +++ b/pkgs/games/tcl2048/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, tcl, tcllib, runtimeShell }: +{ lib, fetchurl, tcl, tclPackages, runtimeShell }: tcl.mkTclDerivation rec { pname = "tcl2048"; @@ -9,7 +9,7 @@ tcl.mkTclDerivation rec { sha256 = "53f5503efd7f029b2614b0f9b1e3aac6c0342735a3c9b811d74a5135fee3e89e"; }; - buildInputs = [ tcllib ]; + buildInputs = [ tclPackages.tcllib ]; dontUnpack = true; installPhase = '' diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 19a5115d4feaf..e08cc87d35c71 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -152,6 +152,7 @@ mapAliases { inherit (libsForQt5.mauiPackages) buho; # added 2022-05-17 butler = throw "butler was removed because it was broken and abandoned upstream"; # added 2024-06-18 + bwidget = tclPackages.bwidget; # Added 2024-10-02 # Shorter names; keep the longer name for back-compat. Added 2023-04-11 buildFHSUserEnv = buildFHSEnv; buildFHSUserEnvChroot = buildFHSEnvChroot; @@ -220,6 +221,7 @@ mapAliases { concurrencykit = throw "'concurrencykit' has been renamed to/replaced by 'libck'"; # Converted to throw 2024-10-17 containerpilot = throw "'containerpilot' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2024-06-09 crackmapexec = throw "'crackmapexec' has been removed as it was unmaintained. Use 'netexec' instead"; # 2024-08-11 + critcl = tclPackages.critcl; # Added 2024-10-02 cups-kyodialog3 = cups-kyodialog; # Added 2022-11-12 cvs_fast_export = throw "'cvs_fast_export' has been renamed to/replaced by 'cvs-fast-export'"; # Converted to throw 2024-10-17 @@ -498,6 +500,7 @@ mapAliases { imagemagick7 = throw "'imagemagick7' has been renamed to/replaced by 'imagemagick'"; # Converted to throw 2024-10-17 imagemagick7_light = throw "'imagemagick7_light' has been renamed to/replaced by 'imagemagick_light'"; # Converted to throw 2024-10-17 immersed-vr = lib.warn "'immersed-vr' has been renamed to 'immersed'" immersed; # Added 2024-08-11 + incrtcl = tclPackages.incrtcl; # Added 2024-10-02 input-utils = throw "The input-utils package was dropped since it was unmaintained."; # Added 2024-06-21 index-fm = libsForQt5.mauiPackages.index; # added 2022-05-17 inotifyTools = inotify-tools; @@ -511,6 +514,7 @@ mapAliases { isl_0_11 = throw "isl_0_11 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13 isl_0_14 = throw "isl_0_14 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13 iso-flags-png-320x420 = lib.warn "iso-flags-png-320x420 has been renamed to iso-flags-png-320x240" iso-flags-png-320x240; # Added 2024-07-17 + itktcl = tclPackages.itktcl; # Added 2024-10-02 ### J ### @@ -761,6 +765,7 @@ mapAliases { mpg321 = throw "'mpg321' has been removed due to it being unmaintained by upstream. Consider using mpg123 instead."; # Added 2024-05-10 msp430NewlibCross = msp430Newlib; # Added 2024-09-06 mupdf_1_17 = throw "'mupdf_1_17' has been removed due to being outdated and insecure. Consider using 'mupdf' instead."; # Added 2024-08-22 + mustache-tcl = tclPackages.mustache-tcl; # Added 2024-10-02 mutt-with-sidebar = mutt; # Added 2022-09-17 mysql-client = hiPrio mariadb.client; mysql = throw "'mysql' has been renamed to/replaced by 'mariadb'"; # Converted to throw 2024-10-17 @@ -881,6 +886,7 @@ mapAliases { patchelfStable = patchelf; # Added 2024-01-25 pcsctools = pcsc-tools; # Added 2023-12-07 pcsxr = throw "pcsxr was removed as it has been abandoned for over a decade; please use DuckStation, Mednafen, or the RetroArch PCSX ReARMed core"; # Added 2024-08-20 + pdf4tcl = tclPackages.pdf4tcl; # Added 2024-10-02 peach = asouldocs; # Added 2022-08-28 percona-server_innovation = lib.warn "Percona upstream has decided to skip all Innovation releases of MySQL and only release LTS versions." percona-server; # Added 2024-10-13 percona-server_lts = percona-server; # Added 2024-10-13 @@ -1118,7 +1124,16 @@ mapAliases { taplo-cli = taplo; # Added 2022-07-30 taplo-lsp = taplo; # Added 2022-07-30 taro = taproot-assets; # Added 2023-07-04 + tcl-fcgi = tclPackages.tcl-fcgi; # Added 2024-10-02 + tclcurl = tclPackages.tclcurl; # Added 2024-10-02 + tcllib = tclPackages.tcllib; # Added 2024-10-02 + tclmagick = tclPackages.tclmagick; # Added 2024-10-02 + tcltls = tclPackages.tcltls; # Added 2024-10-02 + tcludp = tclPackages.tcludp; # Added 2024-10-02 + tclvfs = tclPackages.tclvfs; # Added 2024-10-02 + tclx = tclPackages.tclx; # Added 2024-10-02 tdesktop = telegram-desktop; # Added 2023-04-07 + tdom = tclPackages.tdom; # Added 2024-10-02 teck-programmer = throw "teck-programmer was removed because it was broken and unmaintained"; # added 2024-08-23 teleport_13 = throw "teleport 13 has been removed as it is EOL. Please upgrade to Teleport 14 or later"; # Added 2024-05-26 teleport_14 = throw "teleport 14 has been removed as it is EOL. Please upgrade to Teleport 15 or later"; # Added 2024-10-18 @@ -1135,7 +1150,9 @@ mapAliases { invalidateFetcherByDrvHash = testers.invalidateFetcherByDrvHash; # Added 2022-05-05 timescale-prometheus = throw "'timescale-prometheus' has been renamed to/replaced by 'promscale'"; # Converted to throw 2024-10-17 tightvnc = throw "'tightvnc' has been removed as the version 1.3 is not maintained upstream anymore and is insecure"; # Added 2024-08-22 + tix = tclPackages.tix; # Added 2024-10-02 tkcvs = tkrev; # Added 2022-03-07 + tkimg = tclPackages.tkimg; # Added 2024-10-02 toil = throw "toil was removed as it was broken and requires obsolete versions of libraries"; # Added 2024-09-22 tokodon = plasma5Packages.tokodon; tokyo-night-gtk = tokyonight-gtk-theme; # Added 2024-01-28 @@ -1213,6 +1230,7 @@ mapAliases { ### W ### wakatime = wakatime-cli; # 2024-05-30 wal_e = throw "wal_e was removed as it is unmaintained upstream and depends on the removed boto package; upstream recommends using wal-g or pgbackrest"; # Added 2024-09-22 + wapp = tclPackages.wapp; # Added 2024-10-02 wayfireApplications-unwrapped = throw '' 'wayfireApplications-unwrapped.wayfire' has been renamed to/replaced by 'wayfire' 'wayfireApplications-unwrapped.wayfirePlugins' has been renamed to/replaced by 'wayfirePlugins' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b7d3dfb911546..7a673405d40d1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7399,7 +7399,7 @@ with pkgs; extundelete = callPackage ../tools/filesystems/extundelete { }; - expect = callPackage ../tools/misc/expect { }; + expect = tclPackages.expect; expected-lite = callPackage ../development/libraries/expected-lite { }; @@ -14440,10 +14440,6 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreServices; }; - critcl = callPackage ../development/compilers/critcl { - tcllib = tcllib.override { withCritcl = false; }; - }; - inherit (darwin.apple_sdk_11_0.callPackage ../development/compilers/crystal { }) crystal_1_2 crystal_1_7 @@ -16626,7 +16622,10 @@ with pkgs; 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 { }; + # We don't need versioned package sets thanks to the tcl stubs mechanism + tclPackages = recurseIntoAttrs (callPackage ./tcl-packages.nix {}); + + tclreadline = tclPackages.tclreadline; eltclsh = callPackage ../development/tools/eltclsh { }; @@ -18995,8 +18994,6 @@ with pkgs; bulletml = callPackage ../development/libraries/bulletml { }; - bwidget = callPackage ../development/libraries/bwidget { }; - bzrtp = callPackage ../development/libraries/bzrtp { }; c-ares = callPackage ../development/libraries/c-ares { }; @@ -20272,9 +20269,6 @@ with pkgs; ijs = callPackage ../development/libraries/ijs { }; - itktcl = callPackage ../development/libraries/itktcl { }; - incrtcl = callPackage ../development/libraries/incrtcl { }; - indicator-application-gtk2 = callPackage ../development/libraries/indicator-application/gtk2.nix { }; indicator-application-gtk3 = callPackage ../development/libraries/indicator-application/gtk3.nix { }; @@ -23213,14 +23207,6 @@ with pkgs; tclap_1_4 = callPackage ../development/libraries/tclap/1.4.nix { }; - tcllib = callPackage ../development/libraries/tcllib { }; - - tcltls = callPackage ../development/libraries/tcltls { }; - - tclx = callPackage ../development/libraries/tclx { }; - - tcl-fcgi = callPackage ../development/libraries/tcl-fcgi { }; - tdb = callPackage ../development/libraries/tdb { }; tdlib = callPackage ../development/libraries/tdlib { }; @@ -23269,16 +23255,12 @@ with pkgs; tivodecode = callPackage ../applications/video/tivodecode { }; - tix = callPackage ../development/libraries/tix { }; - tk = tk-8_6; tk-9_0 = callPackage ../development/libraries/tk/9.0.nix { tcl = tcl-9_0; }; tk-8_6 = callPackage ../development/libraries/tk/8.6.nix { }; tk-8_5 = callPackage ../development/libraries/tk/8.5.nix { tcl = tcl-8_5; }; - tkimg = callPackage ../development/libraries/tkimg { }; - tkrzw = callPackage ../development/libraries/tkrzw { }; tl-expected = callPackage ../development/libraries/tl-expected { }; @@ -23448,8 +23430,6 @@ with pkgs; wangle = darwin.apple_sdk_11_0.callPackage ../development/libraries/wangle { }; - wapp = callPackage ../development/libraries/wapp { }; - wavpack = callPackage ../development/libraries/wavpack { }; wayland = darwin.apple_sdk_11_0.callPackage ../development/libraries/wayland { }; @@ -27313,8 +27293,6 @@ with pkgs; mustache-spec = callPackage ../data/documentation/mustache-spec { }; - mustache-tcl = callPackage ../development/libraries/mustache-tcl { }; - mustache-go = callPackage ../development/tools/mustache-go { }; mustache-hpp = callPackage ../development/libraries/mustache-hpp { }; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index f1d40ccc835b9..7e00010578e4b 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -24089,9 +24089,9 @@ with self; { hash = "sha256-+DhYd6Sp7Z89OQPS0PfNcPrDzmgyxg9gCmghzuP7WHI="; }; propagatedBuildInputs = [ - pkgs.bwidget + pkgs.tclPackages.bwidget pkgs.tcl - pkgs.tix + pkgs.tclPackages.tix pkgs.tk ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ]; diff --git a/pkgs/top-level/tcl-packages.nix b/pkgs/top-level/tcl-packages.nix new file mode 100644 index 0000000000000..6be1844b4c36a --- /dev/null +++ b/pkgs/top-level/tcl-packages.nix @@ -0,0 +1,21 @@ +let + autoCalledPackages = import ./by-name-overlay.nix ../development/tcl-modules/by-name; +in + +{ + lib, + newScope, + tcl, + tk, +}: + +lib.makeScope newScope ( + lib.extends autoCalledPackages (self: { + inherit tcl tk; + inherit (tcl) mkTclDerivation tclPackageHook; + + critcl = self.callPackage ../development/tcl-modules/critcl { + tcllib = self.tcllib.override { withCritcl = false; }; + }; + }) +)