Files
nixpkgs/pkgs/development/python-modules/bootstrap/installer/default.nix
T
Jan Tojnar ac83abceb5 python313.pkgs.installer: Fix build
Python 3.13 removed `importlib.resources.read_binary` breaking the build of `installer` package.
2024-02-10 16:59:37 +01:00

30 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
'';
}