depot/third_party/nixpkgs/pkgs/development/python-modules/bootstrap/installer/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

29 lines
546 B
Nix

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