2018-10-28 15:34:55 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, python
|
|
|
|
, py
|
|
|
|
, isPyPy
|
|
|
|
}:
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
buildPythonPackage {
|
2020-03-29 11:34:50 +01:00
|
|
|
pname = "tkinter";
|
|
|
|
version = python.version;
|
2018-10-28 15:34:55 +00:00
|
|
|
src = py;
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
disabled = isPyPy;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# Move the tkinter module
|
|
|
|
mkdir -p $out/${py.sitePackages}
|
|
|
|
mv lib/${py.libPrefix}/lib-dynload/_tkinter* $out/${py.sitePackages}/
|
|
|
|
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
|
|
|
# Update the rpath to point to python without x11Support
|
|
|
|
old_rpath=$(patchelf --print-rpath $out/${py.sitePackages}/_tkinter*)
|
|
|
|
new_rpath=$(sed "s#${py}#${python}#g" <<< "$old_rpath" )
|
|
|
|
patchelf --set-rpath $new_rpath $out/${py.sitePackages}/_tkinter*
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = py.meta;
|
|
|
|
|
|
|
|
}
|