1{ lib 2, stdenv 3, buildPythonPackage 4, python 5, py 6, isPyPy 7}: 8 9buildPythonPackage { 10 pname = "tkinter"; 11 version = python.version; 12 src = py; 13 format = "other"; 14 15 disabled = isPyPy; 16 17 installPhase = '' 18 # Move the tkinter module 19 mkdir -p $out/${py.sitePackages} 20 mv lib/${py.libPrefix}/lib-dynload/_tkinter* $out/${py.sitePackages}/ 21 '' + lib.optionalString (!stdenv.isDarwin) '' 22 # Update the rpath to point to python without x11Support 23 old_rpath=$(patchelf --print-rpath $out/${py.sitePackages}/_tkinter*) 24 new_rpath=$(sed "s#${py}#${python}#g" <<< "$old_rpath" ) 25 patchelf --set-rpath $new_rpath $out/${py.sitePackages}/_tkinter* 26 ''; 27 28 meta = py.meta; 29 30}