From d3b9a9ba3d4e3a39cd3913ea35d2dfaafac33b7f Mon Sep 17 00:00:00 2001 From: Rasmus Rendal Date: Fri, 9 May 2025 20:35:05 +0200 Subject: [PATCH] tk-9_0: Fix missing symlink On version 9 and on, also include the tcl version in the library filename Co-authored-by: Francesco Gazzetta --- pkgs/development/libraries/tk/generic.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/tk/generic.nix b/pkgs/development/libraries/tk/generic.nix index f5331c6fdaa1..5a010c7b12bd 100644 --- a/pkgs/development/libraries/tk/generic.nix +++ b/pkgs/development/libraries/tk/generic.nix @@ -38,10 +38,15 @@ tcl.mkTclDerivation { ''; postInstall = + let + # From version 9, the tcl version is included in the lib filename + libtclstring = lib.optionalString (lib.versionAtLeast tcl.version "9.0") "tcl${lib.versions.major tcl.version}"; + libfile = "$out/lib/lib${libtclstring}tk${tcl.release}${stdenv.hostPlatform.extensions.sharedLibrary}"; + in '' ln -s $out/bin/wish* $out/bin/wish cp ../{unix,generic}/*.h $out/include - ln -s $out/lib/libtk${tcl.release}${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libtk${stdenv.hostPlatform.extensions.sharedLibrary} + ln -s ${libfile} $out/lib/libtk${stdenv.hostPlatform.extensions.sharedLibrary} '' + lib.optionalString (stdenv.hostPlatform.isDarwin) '' cp ../macosx/*.h $out/include