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