From 414cde4df44e61115682d8e846fbfb9db0471eea Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 18 Aug 2019 22:23:13 +0200 Subject: [PATCH] python: allow stripping IDLE --- pkgs/development/interpreters/python/cpython/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index e2286c210296..c1e2cd866343 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -21,6 +21,7 @@ , sha256 , passthruFun , bash +, stripIdlelib ? false }: assert x11Support -> tcl != null @@ -222,6 +223,10 @@ in with passthru; stdenv.mkDerivation { find $out/lib/python*/config-* -type f -print -exec nuke-refs -e $out '{}' + find $out/lib -name '_sysconfigdata*.py*' -print -exec nuke-refs -e $out '{}' + + '' + optionalString stripIdlelib '' + # Strip IDLE (and turtledemo, which uses it) + rm -R $out/bin/idle* $out/lib/python*/{idlelib,turtledemo} + '' + '' # Include a sitecustomize.py file cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py