nixpkgs/pkgs/development/python-modules/recursive-pth-loader/default.nix
Ricardo M. Correia 5f3b19e661 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.
2013-09-08 21:21:28 +02:00

24 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";
};
}