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";
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
buildPhase = "${python.pythonOnBuildForHost}/bin/${python.pythonOnBuildForHost.executable} -m compileall .";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
2024-02-07 01:22:34 +00:00
|
|
|
dst=$out/${python.sitePackages}
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $dst
|
|
|
|
cp sitecustomize.* $dst/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Enable recursive processing of pth files anywhere in sys.path";
|
|
|
|
};
|
|
|
|
}
|