e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
30 lines
578 B
Nix
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
|
|
'';
|
|
}
|