From a2720a25b9d38a421cce4a6e6caf685481e6c40a Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 6 Oct 2016 17:55:23 +0200 Subject: [PATCH] Python 3.6: separate output for tkinter --- .../interpreters/python/cpython/3.6/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix index 3f25640afeaa..b019fdc5e8f5 100644 --- a/pkgs/development/interpreters/python/cpython/3.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix @@ -29,6 +29,7 @@ let pythonVersion = majorVersion; version = "${majorVersion}.${minorVersion}${minorVersionSuffix}"; libPrefix = "python${majorVersion}"; + sitePackages = "lib/${libPrefix}/site-packages"; buildInputs = filter (p: p != null) [ glibc @@ -103,8 +104,16 @@ stdenv.mkDerivation { echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py ''; + postFixup = '' + # tkinter goes in a separate output + mkdir -p $tkinter/${sitePackages} + mv $out/lib/${libPrefix}/lib-dynload/_tkinter* $tkinter/${sitePackages}/ + ''; + + outputs = ["out" "tkinter"]; + passthru = rec { - inherit libPrefix; + inherit libPrefix sitePackages; zlibSupport = zlib != null; sqliteSupport = sqlite != null; dbSupport = db != null; @@ -117,7 +126,6 @@ stdenv.mkDerivation { isPy3 = true; isPy35 = true; is_py3k = true; # deprecated - sitePackages = "lib/${libPrefix}/site-packages"; interpreter = "${self}/bin/${executable}"; };