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.
This commit is contained in:
parent
575be7dd4b
commit
5f3b19e661
1 changed files with 5 additions and 1 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue