mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 02:05:51 +03:00
python3.pkgs.bootstrap.build: init at 0.10.0
Co-authored-by: K900 <me@0upti.me>
This commit is contained in:
parent
8fe3d15c17
commit
b53cef70f2
49
pkgs/development/python-modules/bootstrap/build/default.nix
Normal file
49
pkgs/development/python-modules/bootstrap/build/default.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, python
|
||||
, build
|
||||
, flit-core
|
||||
, installer
|
||||
, packaging
|
||||
, pyproject-hooks
|
||||
, tomli
|
||||
}:
|
||||
let
|
||||
buildBootstrapPythonModule = basePackage: attrs: stdenv.mkDerivation ({
|
||||
pname = "${python.libPrefix}-bootstrap-${basePackage.pname}";
|
||||
inherit (basePackage) 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
|
||||
'';
|
||||
} // attrs);
|
||||
|
||||
bootstrap-packaging = buildBootstrapPythonModule packaging {};
|
||||
|
||||
bootstrap-pyproject-hooks = buildBootstrapPythonModule pyproject-hooks {};
|
||||
|
||||
bootstrap-tomli = buildBootstrapPythonModule tomli {};
|
||||
in
|
||||
buildBootstrapPythonModule build {
|
||||
propagatedBuildInputs = [
|
||||
bootstrap-packaging
|
||||
bootstrap-pyproject-hooks
|
||||
] ++ lib.optionals (python.pythonOlder "3.11") [
|
||||
bootstrap-tomli
|
||||
];
|
||||
}
|
@ -13,6 +13,9 @@ self: super: with self; {
|
||||
installer = toPythonModule (callPackage ../development/python-modules/bootstrap/installer {
|
||||
inherit (bootstrap) flit-core;
|
||||
});
|
||||
build = toPythonModule (callPackage ../development/python-modules/bootstrap/build {
|
||||
inherit (bootstrap) flit-core installer;
|
||||
});
|
||||
};
|
||||
|
||||
bootstrapped-pip = toPythonModule (callPackage ../development/python-modules/bootstrapped-pip { });
|
||||
|
Loading…
Reference in New Issue
Block a user