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