mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
23 lines
458 B
Nix
23 lines
458 B
Nix
# This function provides specific bits for building a flit-based Python package.
|
|
|
|
{ python
|
|
, flit
|
|
}:
|
|
|
|
{ ... } @ attrs:
|
|
|
|
attrs // {
|
|
buildInputs = [ flit ];
|
|
buildPhase = attrs.buildPhase or ''
|
|
runHook preBuild
|
|
flit wheel
|
|
runHook postBuild
|
|
'';
|
|
|
|
# Flit packages, like setuptools packages, might have tests.
|
|
installCheckPhase = attrs.checkPhase or ''
|
|
${python.interpreter} -m unittest discover
|
|
'';
|
|
doCheck = attrs.doCheck or true;
|
|
}
|