2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
python,
|
|
|
|
flit-core,
|
|
|
|
installer,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "${python.libPrefix}-bootstrap-${installer.pname}";
|
2024-06-05 15:53:02 +00:00
|
|
|
inherit (installer)
|
|
|
|
version
|
|
|
|
src
|
|
|
|
patches
|
|
|
|
meta
|
|
|
|
;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|