Commit d3b9a9ba authored by Rasmus Rendal's avatar Rasmus Rendal Committed by Francesco Gazzetta
Browse files

tk-9_0: Fix missing symlink



On version 9 and on, also include the tcl version in the library filename

Co-authored-by: default avatarFrancesco Gazzetta <fgaz@fgaz.me>
parent a397e456
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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