12 version = python.version;
20 # Move the tkinter module
21 mkdir -p $out/${py.sitePackages}
22 mv lib/${py.libPrefix}/lib-dynload/_tkinter* $out/${py.sitePackages}/
24 + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
25 # Update the rpath to point to python without x11Support
26 old_rpath=$(patchelf --print-rpath $out/${py.sitePackages}/_tkinter*)
27 new_rpath=$(sed "s#${py}#${python}#g" <<< "$old_rpath" )
28 patchelf --set-rpath $new_rpath $out/${py.sitePackages}/_tkinter*
32 # Based on first sentence from https://docs.python.org/3/library/tkinter.html
33 description = "Standard Python interface to the Tcl/Tk GUI toolkit";
35 The tkinter package (“Tk interface”) is the standard Python interface to
36 the Tcl/Tk GUI toolkit. Both Tk and tkinter are available on most Unix
37 platforms, including macOS, as well as on Windows systems.
39 Running python -m tkinter from the command line should open a window
40 demonstrating a simple Tk interface, letting you know that tkinter is
41 properly installed on your system, and also showing what version of
42 Tcl/Tk is installed, so you can read the Tcl/Tk documentation specific to
45 Tkinter supports a range of Tcl/Tk versions, built either with or without
46 thread support. The official Python binary release bundles Tcl/Tk 8.6
47 threaded. See the source code for the _tkinter module for more
48 information about supported versions.
50 Tkinter is not a thin wrapper, but adds a fair amount of its own logic to
51 make the experience more pythonic. This documentation will concentrate on
52 these additions and changes, and refer to the official Tcl/Tk
53 documentation for details that are unchanged.