Merge pull request #235268 from wegank/tk-guix

tk: hardcode path to TK_LIBRARY
This commit is contained in:
Weijia Wang
2023-06-01 17:48:55 +02:00
committed by GitHub
3 changed files with 30 additions and 2 deletions
+1 -2
View File
@@ -42,7 +42,6 @@ buildPythonApplication rec {
preFixup = ''
wrapProgram "$out/bin/thonny" \
--set TK_LIBRARY "${tk}/lib/${tk.libPrefix}" \
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3.pkgs.jedi})
'';
@@ -64,6 +63,6 @@ buildPythonApplication rec {
homepage = "https://www.thonny.org/";
license = licenses.mit;
maintainers = with maintainers; [ leenaars ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}
+4
View File
@@ -14,4 +14,8 @@ callPackage ./generic.nix (args // {
sha256 = "sha256-LmX6BpojNlRAo8VsVWuGc7XjKig4ANjZslfj9YTOBnU=";
};
patches = [
./tk-8_6_13-find-library.patch
];
})
@@ -0,0 +1,25 @@
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index fa25553..ad45598 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -1045,6 +1045,7 @@ TkCreateMainWindow(
Tcl_SetVar2(interp, "tk_patchLevel", NULL, TK_PATCH_LEVEL, TCL_GLOBAL_ONLY);
Tcl_SetVar2(interp, "tk_version", NULL, TK_VERSION, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, "tk_library", NULL, TK_LIBRARY, TCL_GLOBAL_ONLY);
tsdPtr->numMainWindows++;
return tkwin;
diff --git a/unix/Makefile.in b/unix/Makefile.in
index e98070e..f417753 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -1033,7 +1033,7 @@ tkVisual.o: $(GENERIC_DIR)/tkVisual.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkVisual.c
tkWindow.o: $(GENERIC_DIR)/tkWindow.c tkUuid.h
- $(CC) -c $(CC_SWITCHES) -I. $(GENERIC_DIR)/tkWindow.c
+ $(CC) -c $(CC_SWITCHES) -I. -DTK_LIBRARY=\"${TK_LIBRARY}\" $(GENERIC_DIR)/tkWindow.c
tkButton.o: $(GENERIC_DIR)/tkButton.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkButton.c