2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, python }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "python-recursive-pth-loader";
|
|
|
|
version = "1.0";
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
buildInputs = [ python ];
|
|
|
|
|
|
|
|
patchPhase = "cat ${./sitecustomize.py} > sitecustomize.py";
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildPhase = "${python.pythonForBuild}/bin/${python.pythonForBuild.executable} -m compileall .";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|