Files
nixpkgs/pkgs/development/python-modules/bootstrap/packaging/default.nix
T
Martin Weinelt 8f3162f83f python3.pkgs.pythonRuntimeDepsCheckHook: init
Implements a hook, that checks whether all dependencies, as specified by
the wheel manifest, are present in the current environment.

Complains about missing packages, as well as version specifier
mismatches.
2023-12-20 20:10:22 +01:00

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