depot/third_party/nixpkgs/pkgs/development/python-modules/recursive-pth-loader/default.nix
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

25 lines
559 B
Nix

{ stdenv, python }:
stdenv.mkDerivation {
pname = "python-recursive-pth-loader";
version = "1.0";
dontUnpack = true;
buildInputs = [ python ];
patchPhase = "cat ${./sitecustomize.py} > sitecustomize.py";
buildPhase = "${python.pythonForBuild}/bin/${python.pythonForBuild.executable} -m compileall .";
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";
};
}