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