1{ stdenv, python }:
2
3stdenv.mkDerivation {
4 pname = "python-recursive-pth-loader";
5 version = "1.0";
6
7 dontUnpack = true;
8
9 buildInputs = [ python ];
10
11 patchPhase = "cat ${./sitecustomize.py} > sitecustomize.py";
12
13 buildPhase = "${python.pythonForBuild}/bin/${python.pythonForBuild.executable} -m compileall .";
14
15 installPhase =
16 ''
17 dst=$out/lib/${python.libPrefix}/site-packages
18 mkdir -p $dst
19 cp sitecustomize.* $dst/
20 '';
21
22 meta = {
23 description = "Enable recursive processing of pth files anywhere in sys.path";
24 };
25}