pythonPackages.tkinter: refactor move to python-modules
This commit is contained in:
parent
8d26762f19
commit
c3793aa1b1
28
pkgs/development/python-modules/tkinter/default.nix
Normal file
28
pkgs/development/python-modules/tkinter/default.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, python
|
||||||
|
, py
|
||||||
|
, isPyPy
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
name = "tkinter-${python.version}";
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
@ -3977,26 +3977,7 @@ in {
|
|||||||
# Python package.
|
# Python package.
|
||||||
tkinter = let
|
tkinter = let
|
||||||
py = python.override{x11Support=true;};
|
py = python.override{x11Support=true;};
|
||||||
in buildPythonPackage rec {
|
in callPackage ../development/python-modules/tkinter { py = py; };
|
||||||
name = "tkinter-${python.version}";
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
|
|
||||||
tlslite = buildPythonPackage rec {
|
tlslite = buildPythonPackage rec {
|
||||||
name = "tlslite-${version}";
|
name = "tlslite-${version}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user