diff options
author | Ricardo M. Correia <rcorreia@wizy.org> | 2013-09-07 00:48:42 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2013-09-08 21:21:28 +0200 |
commit | 5f3b19e661a18a10f65185a02df025c094ffe59b (patch) | |
tree | c53cc4441f6c884e4db65a34b82056d5fb486424 /pkgs/development/python-modules | |
parent | 575be7dd4bde2121dfff755d3f671ef8822580da (diff) | |
download | nixlib-5f3b19e661a18a10f65185a02df025c094ffe59b.tar nixlib-5f3b19e661a18a10f65185a02df025c094ffe59b.tar.gz nixlib-5f3b19e661a18a10f65185a02df025c094ffe59b.tar.bz2 nixlib-5f3b19e661a18a10f65185a02df025c094ffe59b.tar.lz nixlib-5f3b19e661a18a10f65185a02df025c094ffe59b.tar.xz nixlib-5f3b19e661a18a10f65185a02df025c094ffe59b.tar.zst nixlib-5f3b19e661a18a10f65185a02df025c094ffe59b.zip |
recursive-pth-loader: build sitecustomize.pyc
If this file is not created at build time, then python (when run as root) will create it at run time and mess up the consistency of the nix store.
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/recursive-pth-loader/default.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/recursive-pth-loader/default.nix b/pkgs/development/python-modules/recursive-pth-loader/default.nix index 959882be9380..e281d69c98ae 100644 --- a/pkgs/development/python-modules/recursive-pth-loader/default.nix +++ b/pkgs/development/python-modules/recursive-pth-loader/default.nix @@ -7,11 +7,15 @@ stdenv.mkDerivation rec { buildInputs = [ python ]; + patchPhase = "cat ${./sitecustomize.py} > sitecustomize.py"; + + buildPhase = "python -m compileall ."; + installPhase = '' dst=$out/lib/${python.libPrefix}/site-packages mkdir -p $dst - cat ${./sitecustomize.py} >> $dst/sitecustomize.py + cp sitecustomize.* $dst/ ''; meta = { |