From fee414494c00769d62f1bc266848ddb7daa8aaa5 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Wed, 23 Sep 2026 14:52:29 +0200 Subject: [PATCH 1/2] tcl.tclRequiresCheckHook: refer to tclsh by absolute path Without this, tcl has to be put in nativeBuildInputs or the hook fails. --- pkgs/development/interpreters/tcl/generic.nix | 1 + pkgs/development/interpreters/tcl/tcl-requires-check-hook.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/tcl/generic.nix b/pkgs/development/interpreters/tcl/generic.nix index 535ac2bd30d0..fcc9966ef069 100644 --- a/pkgs/development/interpreters/tcl/generic.nix +++ b/pkgs/development/interpreters/tcl/generic.nix @@ -225,6 +225,7 @@ stdenv.mkDerivation (finalAttrs: { name = "tcl-requires-check-hook"; substitutions = { tcl_hook = ./tcl-requires-check-hook.tcl; + tclsh = lib.getExe finalAttrs.finalPackage; }; meta = { inherit (finalAttrs.meta) maintainers platforms; diff --git a/pkgs/development/interpreters/tcl/tcl-requires-check-hook.sh b/pkgs/development/interpreters/tcl/tcl-requires-check-hook.sh index 6e3066d03b48..9600416c55dd 100644 --- a/pkgs/development/interpreters/tcl/tcl-requires-check-hook.sh +++ b/pkgs/development/interpreters/tcl/tcl-requires-check-hook.sh @@ -7,7 +7,7 @@ tclRequiresCheckPhase () { if [ -n "$tclRequiresCheck" ]; then export TCLLIBPATH="$out/lib $TCLLIBPATH" # Redundant if tcl-package-hook is also used # FIXME: For some reason the output gets swallowed unless we pipe it through cat‽ - tclsh @tcl_hook@ 2>&1 | cat + @tclsh@ @tcl_hook@ 2>&1 | cat fi } From 12be4dc500eaf75db5c7f16cbf9a94f1a1682930 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Wed, 23 Sep 2026 14:53:08 +0200 Subject: [PATCH 2/2] tclPackages.rl_json: use tclRequiresCheck --- pkgs/development/tcl-modules/by-name/rl/rl_json/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/tcl-modules/by-name/rl/rl_json/package.nix b/pkgs/development/tcl-modules/by-name/rl/rl_json/package.nix index 67a9717397ac..f1a12aaefb51 100644 --- a/pkgs/development/tcl-modules/by-name/rl/rl_json/package.nix +++ b/pkgs/development/tcl-modules/by-name/rl/rl_json/package.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ autoreconfHook tcl.tclPackageHook + tcl.tclRequiresCheckHook pandoc ]; @@ -39,6 +40,8 @@ stdenv.mkDerivation (finalAttrs: { doCheck = true; + tclRequiresCheck = [ "rl_json" ]; + meta = { homepage = "https://github.com/RubyLane/rl_json"; description = "Tcl extension for fast json manipulation";