From 5d2290bb58f0252ad6ea29723827d40765099c44 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Wed, 26 Jul 2023 00:56:50 -0700 Subject: [PATCH] python3.pkgs.bootstrap.flit-core: init at 3.8.0 Co-authored-by: K900 --- .../bootstrap/flit-core/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 +++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/bootstrap/flit-core/default.nix 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 { };