From 1009ec8796f7a36466c073961ffe57792bc6d750 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Thu, 26 Sep 2024 17:18:31 +0200 Subject: [PATCH] tclPackages: init --- .github/labeler.yml | 9 +++++++++ ci/OWNERS | 6 ++++++ pkgs/development/tcl-modules/by-name/README.md | 17 +++++++++++++++++ pkgs/top-level/all-packages.nix | 3 +++ pkgs/top-level/tcl-packages.nix | 18 ++++++++++++++++++ 5 files changed, 53 insertions(+) create mode 100644 pkgs/development/tcl-modules/by-name/README.md create mode 100644 pkgs/top-level/tcl-packages.nix diff --git a/.github/labeler.yml b/.github/labeler.yml index 485bcce6a8a4..1d70faf6423b 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 e44f18cb296c..1b38ca71df0f 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -177,6 +177,12 @@ 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 + # C compilers /pkgs/development/compilers/gcc /pkgs/development/compilers/llvm @alyssais @RossComputerGuy @NixOS/llvm 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 000000000000..c65310524c1c --- /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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e451904f5d98..43ac381f7843 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16614,6 +16614,9 @@ with pkgs; tcl-8_6 = callPackage ../development/interpreters/tcl/8.6.nix { }; tcl-9_0 = callPackage ../development/interpreters/tcl/9.0.nix { }; + # We don't need versioned package sets thanks to the tcl stubs mechanism + tclPackages = recurseIntoAttrs (callPackage ./tcl-packages.nix {}); + tclreadline = callPackage ../development/interpreters/tclreadline { }; eltclsh = callPackage ../development/tools/eltclsh { }; diff --git a/pkgs/top-level/tcl-packages.nix b/pkgs/top-level/tcl-packages.nix new file mode 100644 index 000000000000..2bb488b0710e --- /dev/null +++ b/pkgs/top-level/tcl-packages.nix @@ -0,0 +1,18 @@ +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; + + }) +)