From 597373bbd5ca3237f3b198c150cf7dbb63183fb1 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 24 Dec 2014 18:09:10 +0100 Subject: chromium: Precompile pycs instead of deleting. This is more of an attempt rather than a real fix (or maybe it is? let's see) for the corrupted .pyc files during build. I believe the reason we get these are likely due to several instances of the Python interpreter that run in parallel and one of these processes might still be writing the .pyc file. So, rather than deleting all .pyc files, we now precompile then in order to avoid any build process trying to generate any .pyc file. Signed-off-by: aszlig --- pkgs/applications/networking/browsers/chromium/common.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkgs') diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index be227fe05793..ee46bb970725 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -186,11 +186,13 @@ let } // (extraAttrs.gypFlags or {})); configurePhase = '' + # Precompile .pyc files to prevent race conditions during build + python -m compileall -q -f . || : # ignore errors + # This is to ensure expansion of $out. libExecPath="${libExecPath}" python build/linux/unbundle/replace_gyp_files.py ${gypFlags} python build/gyp_chromium -f ninja --depth "$(pwd)" ${gypFlags} - find . -iname '*.py[co]' -delete ''; buildPhase = let -- cgit 1.4.1