buildPythonPackage: refactor

This commit is contained in:
Frederik Rietdijk
2016-12-03 13:04:52 +01:00
parent c6a7d8e10f
commit 42bad32e13
8 changed files with 148 additions and 110 deletions

View File

@@ -0,0 +1,19 @@
# This function provides specific bits for building a flit-based Python package.
{ flit
}:
{ ... } @ attrs:
attrs // {
buildInputs = [ flit ];
buildPhase = attrs.buildPhase or ''
runHook preBuild
flit wheel
runHook postBuild
'';
# Flit packages do not come with tests.
installCheckPhase = attrs.checkPhase or ":";
doCheck = attrs.doCheck or false;
}