Files
cloudns/nix/package.nix
2025-05-29 18:25:47 +02:00

45 lines
626 B
Nix

{
src,
python3Packages,
}:
let
inherit (python3Packages)
setuptools
pydantic
pytest
requests
types-requests
mypy
pylint
;
project = (builtins.fromTOML (builtins.readFile "${src}/pyproject.toml")).project;
pname = project.name;
version = project.version;
in
python3Packages.buildPythonPackage {
inherit pname version src;
pyproject = true;
build-system = [ setuptools ];
dependencies = [
requests
pydantic
];
nativeCheckInputs = [
pytest
mypy
types-requests
pylint
];
checkPhase = ''
pytest tests
mypy src
pylint src
'';
}