Created
April 17, 2023 09:54
-
-
Save K900/6f8a56ece9240d3d101d3d03fc49e9d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
pkgs = (import <nixpkgs> {}); | |
inherit (pkgs) stdenv python3; | |
flit-core = stdenv.mkDerivation rec { | |
pname = "flit-core"; | |
version = "3.8.0"; | |
src = python3.pkgs.fetchPypi { | |
pname = "flit_core"; | |
inherit version; | |
hash = "sha256-swWzDJlSbfXmPWAi3SMQoKlBoYe9OIT0yO8EGN9sOfM="; | |
}; | |
nativeBuildInputs = [ python3 ]; | |
buildPhase = '' | |
python -m flit_core.wheel | |
''; | |
installPhase = '' | |
python bootstrap_install.py dist/*.whl --installdir $out/${python3.sitePackages} | |
''; | |
}; | |
installer = stdenv.mkDerivation rec { | |
pname = "installer"; | |
version = "0.7.0"; | |
src = python3.pkgs.fetchPypi { | |
inherit pname version; | |
hash = "sha256-om0+MRYom7CCFuDQ99kl/O8LAZTu36DJRLyqoQbEtjE="; | |
}; | |
nativeBuildInputs = [ python3 flit-core ]; | |
buildPhase = '' | |
python -m flit_core.wheel | |
''; | |
installPhase = '' | |
cd src | |
python -m installer -d $out -p "" ../dist/*.whl | |
''; | |
}; | |
packaging = stdenv.mkDerivation rec { | |
pname = "packaging"; | |
version = "23.1"; | |
src = python3.pkgs.fetchPypi { | |
inherit pname version; | |
hash = "sha256-o5KYDSts/6ZEQxiYvlSwBFFRMZ0efsNPDP7Uh2fdM08="; | |
}; | |
nativeBuildInputs = [ python3 flit-core installer ]; | |
buildPhase = '' | |
python -m flit_core.wheel | |
''; | |
installPhase = '' | |
python -m installer -d $out -p "" dist/*.whl | |
''; | |
}; | |
pyprojectHooks = stdenv.mkDerivation rec { | |
pname = "pyproject-hooks"; | |
version = "1.0.0"; | |
src = python3.pkgs.fetchPypi { | |
pname = "pyproject_hooks"; | |
inherit version; | |
hash = "sha256-8nGymLl/WVXVP7ErcsH7GUjCLBprcLMVxUztrKAmTvU="; | |
}; | |
nativeBuildInputs = [ python3 flit-core installer ]; | |
buildPhase = '' | |
python -m flit_core.wheel | |
''; | |
installPhase = '' | |
python -m installer -d $out -p "" dist/*.whl | |
''; | |
}; | |
tomli = stdenv.mkDerivation rec { | |
pname = "tomli"; | |
version = "2.0.1"; | |
src = python3.pkgs.fetchPypi { | |
inherit pname version; | |
hash = "sha256-3lJsEpFPDFUNFZJMYtcqvEjW/nNkqocygzejEAf+ik8="; | |
}; | |
nativeBuildInputs = [ python3 flit-core installer ]; | |
buildPhase = '' | |
python -m flit_core.wheel | |
''; | |
installPhase = '' | |
python -m installer -d $out -p "" dist/*.whl | |
''; | |
}; | |
build = stdenv.mkDerivation rec { | |
pname = "build"; | |
version = "0.10.0"; | |
src = python3.pkgs.fetchPypi { | |
inherit pname version; | |
hash = "sha256-1bcSZK/bWVHWcESCqseN6IfIBpHFK4iprRlZg8oskmk="; | |
}; | |
nativeBuildInputs = [ python3 flit-core installer packaging pyprojectHooks tomli ]; | |
buildPhase = '' | |
cd src | |
python -m build .. --wheel --no-isolation | |
cd .. | |
''; | |
installPhase = '' | |
python -m installer -d $out -p "" dist/*.whl | |
''; | |
}; | |
in build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment