depot/third_party/nixpkgs/pkgs/development/python-modules/bootstrap/packaging/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

30 lines
578 B
Nix

{ stdenv
, python
, flit-core
, installer
, packaging
}:
stdenv.mkDerivation {
pname = "${python.libPrefix}-bootstrap-${packaging.pname}";
inherit (packaging) version src meta;
buildPhase = ''
runHook preBuild
PYTHONPATH="${flit-core}/${python.sitePackages}" \
${python.interpreter} -m flit_core.wheel
runHook postBuild
'';
installPhase = ''
runHook preInstall
PYTHONPATH="${installer}/${python.sitePackages}" \
${python.interpreter} -m installer \
--destdir "$out" --prefix "" dist/*.whl
runHook postInstall
'';
}