summary refs log blame commit diff
path: root/pkgs/development/interpreters/python/build-python-package-flit.nix
blob: 1beff0ebd834be5d42c94ec1faeff09ed2b73d49 (plain) (tree)
1
2
3
4

                                                                                

        











                                     





                                                              
# 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;
}