updated
This commit is contained in:
46
nix/package.nix
Normal file
46
nix/package.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
src,
|
||||
python3Packages,
|
||||
}:
|
||||
let
|
||||
inherit (python3Packages)
|
||||
setuptools
|
||||
fastapi
|
||||
uvicorn
|
||||
pydantic
|
||||
pytest
|
||||
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 = [
|
||||
fastapi
|
||||
uvicorn
|
||||
pydantic
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest
|
||||
requests
|
||||
mypy
|
||||
pylint
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
pytest tests
|
||||
mypy src
|
||||
pylint src
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user