lol

pythonPackages.tkinter: patch rpath to use only one interpreter

The `tkinter` module is copied from a build of `python` with
`x11Support=true;` but has a reference to that build of `python`. We
however want to use the module in combination with a build of `python`
with `x11Support=false;` (the default). Therefore we patch the rpath to
refer to that `python` instead.

+5 -1
+5 -1
pkgs/top-level/python-packages.nix
··· 25512 25512 disabled = isPy26 || isPyPy; 25513 25513 25514 25514 installPhase = '' 25515 + # Move the tkinter module 25515 25516 mkdir -p $out/${py.sitePackages} 25516 - ls -Al lib/${py.libPrefix}/lib-dynload/ | grep tkinter 25517 25517 mv lib/${py.libPrefix}/lib-dynload/_tkinter* $out/${py.sitePackages}/ 25518 + # Update the rpath to point to python without x11Support 25519 + old_rpath=$(patchelf --print-rpath $out/${py.sitePackages}/_tkinter*) 25520 + new_rpath=$(sed "s#${py}#${python}#g" <<< "$old_rpath" ) 25521 + patchelf --set-rpath $new_rpath $out/${py.sitePackages}/_tkinter* 25518 25522 ''; 25519 25523 25520 25524 inherit (py) meta;