diff --git a/pkgs/development/python-modules/bootstrap/flit-core/default.nix b/pkgs/development/python-modules/bootstrap/flit-core/default.nix new file mode 100644 index 000000000000..ab9e52538d34 --- /dev/null +++ b/pkgs/development/python-modules/bootstrap/flit-core/default.nix @@ -0,0 +1,29 @@ +{ lib +, stdenv +, python +, flit-core +}: + +stdenv.mkDerivation { + pname = "${python.libPrefix}-bootstrap-${flit-core.pname}"; + inherit (flit-core) version src patches meta; + + sourceRoot = "source/flit_core"; + + buildPhase = '' + runHook preBuild + + ${python.interpreter} -m flit_core.wheel + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + ${python.interpreter} bootstrap_install.py dist/flit_core-*.whl \ + --install-root "$out" --installdir "/${python.sitePackages}" + + runHook postInstall + ''; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b9b815ffadc9..fd86e596d860 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8,6 +8,10 @@ self: super: with self; { + bootstrap = lib.recurseIntoAttrs { + flit-core = toPythonModule (callPackage ../development/python-modules/bootstrap/flit-core { }); + }; + bootstrapped-pip = toPythonModule (callPackage ../development/python-modules/bootstrapped-pip { }); setuptools = callPackage ../development/python-modules/setuptools { };