From 39aac70d745ecf322a70a5cb77799f26ad98b64a Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 12 Mar 2020 09:15:02 -0400 Subject: [PATCH] pythonMinimal: don't include site-customise Experimenting with patching the site-customize file causes mass rebuilds for no reason. --- pkgs/development/interpreters/python/cpython/default.nix | 3 ++- pkgs/development/interpreters/python/default.nix | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index b778b62f908..d9d00409095 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -28,6 +28,7 @@ , stripTkinter ? false , rebuildBytecode ? true , stripBytecode ? false +, includeSiteCustomize ? true }: assert x11Support -> tcl != null @@ -237,7 +238,7 @@ in with passthru; stdenv.mkDerivation { '' + optionalString stripTests '' # Strip tests rm -R $out/lib/python*/test $out/lib/python*/**/test{,s} - '' + '' + '' + optionalString includeSiteCustomize '' # Include a sitecustomize.py file cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py '' + optionalString rebuildBytecode '' diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 5fa37a9da2a..1d729286f79 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -143,6 +143,7 @@ in { stripTkinter = true; rebuildBytecode = false; stripBytecode = true; + includeSiteCustomize = false; }).overrideAttrs(old: { pname = "python3-minimal"; meta = old.meta // {