Tcl + tclx package

I’m looking at project that needs tcl , and some extension called tclx.

I’ve set them both up as build inputs, but tcl can’t find the tclx package.

I have not used tcl for 400 years, does anyone know how i can get tcl to find tclx?

running

tclsh

and then

% package names
tdbc::postgres Thread http tcl::tommath TclOO tdbc::odbc opt tcltest msgcat zlib Ttrace Tcl itcl Itcl tdbc sqlite3 platform tdbc::mysql

i presume tclx has to be there…any idea?

package require Tclx ;# provided, of course, Tclx is available.

yeah, that’s the problem…

even putting tclx in my build inputs, tcl can’t find it :frowning:

so either it’s tcl is not liking the way/place or environment that nix is doing… :frowning:
I’ll keep trying.

I also have not used tcl for 400 years, but this is what I was able to put together from what I remember:

~> nix-shell -p tcl tclx
these paths will be fetched (0.11 MiB download, 0.28 MiB unpacked):
  /nix/store/4lpz2cmk3lznb40vld7g9ns86zjiw1vx-tclx-8.4.1
copying path '/nix/store/4lpz2cmk3lznb40vld7g9ns86zjiw1vx-tclx-8.4.1' from 'https://cache.nixos.org'...

~> tclsh
% echo $auto_path
/nix/store/1m7mq4llm0af70w041645yx06839cwz5-tcl-8.6.9/lib/tcl8.6 /nix/store/1m7mq4llm0af70w041645yx06839cwz5-tcl-8.6.9/lib

% lappend auto_path /nix/store/4lpz2cmk3lznb40vld7g9ns86zjiw1vx-tclx-8.4.1/lib/
/nix/store/1m7mq4llm0af70w041645yx06839cwz5-tcl-8.6.9/lib/tcl8.6 /nix/store/1m7mq4llm0af70w041645yx06839cwz5-tcl-8.6.9/lib /nix/store/4lpz2cmk3lznb40vld7g9ns86zjiw1vx-tclx-8.4.1/lib/

% package require Tclx
8.4

Obviously nixpkgs should be doing this for you, so I think tcl in nixpkgs needs some work… or we’re missing something :thinking:

Maybe a tcl.withPackages :man_shrugging:

1 Like

Ok, thanks for your help there…from that i found out that $auto_path can be hotwired from an enviroment variable ($auto_path is a TCL variable…just to add to confusion…it’s not a shell $THING )//

however…

so i should be able to set TCLLIBPATH=${pkgs.tclx}/lib , or something similar.

1 Like