forked from mirrors/nixpkgs
5f3b19e661
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.
25 lines
492 B
Nix
25 lines
492 B
Nix
{ stdenv, python }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "python-recursive-pth-loader-1.0";
|
|
|
|
unpackPhase = "true";
|
|
|
|
buildInputs = [ python ];
|
|
|
|
patchPhase = "cat ${./sitecustomize.py} > sitecustomize.py";
|
|
|
|
buildPhase = "python -m compileall .";
|
|
|
|
installPhase =
|
|
''
|
|
dst=$out/lib/${python.libPrefix}/site-packages
|
|
mkdir -p $dst
|
|
cp sitecustomize.* $dst/
|
|
'';
|
|
|
|
meta = {
|
|
description = "Enable recursive processing of pth files anywhere in sys.path";
|
|
};
|
|
}
|