treewide: move tcl libraries under tclPackages

This commit is contained in:
Francesco Gazzetta
2024-10-26 16:23:15 +00:00
parent 3000459155
commit 68576df997
43 changed files with 98 additions and 100 deletions
@@ -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 =
@@ -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 = {
@@ -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 = ''