diff options
Diffstat (limited to 'pkgs/development/python-modules/tkinter/default.nix')
-rw-r--r-- | pkgs/development/python-modules/tkinter/default.nix | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/pkgs/development/python-modules/tkinter/default.nix b/pkgs/development/python-modules/tkinter/default.nix index ccfc72907014..e051bbf86d98 100644 --- a/pkgs/development/python-modules/tkinter/default.nix +++ b/pkgs/development/python-modules/tkinter/default.nix @@ -1,9 +1,10 @@ -{ lib -, stdenv -, buildPythonPackage -, python -, py -, isPyPy +{ + lib, + stdenv, + buildPythonPackage, + python, + py, + isPyPy, }: buildPythonPackage { @@ -14,20 +15,22 @@ buildPythonPackage { disabled = isPyPy; - installPhase = '' - # Move the tkinter module - mkdir -p $out/${py.sitePackages} - mv lib/${py.libPrefix}/lib-dynload/_tkinter* $out/${py.sitePackages}/ - '' + 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* - ''; + installPhase = + '' + # Move the tkinter module + mkdir -p $out/${py.sitePackages} + mv lib/${py.libPrefix}/lib-dynload/_tkinter* $out/${py.sitePackages}/ + '' + + lib.optionalString (!stdenv.hostPlatform.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 // { # Based on first sentence from https://docs.python.org/3/library/tkinter.html - description = "The standard Python interface to the Tcl/Tk GUI toolkit"; + description = "Standard Python interface to the Tcl/Tk GUI toolkit"; longDescription = '' The tkinter package (“Tk interface”) is the standard Python interface to the Tcl/Tk GUI toolkit. Both Tk and tkinter are available on most Unix @@ -50,5 +53,4 @@ buildPythonPackage { documentation for details that are unchanged. ''; }; - } |