agtest/default.nix

21 lines
518 B
Nix
Raw Normal View History

2021-10-01 18:44:08 +00:00
{ python, buildPythonApplication, nix-gitignore, lark-parser, click, mypy }:
2021-10-01 18:16:51 +00:00
2021-10-01 18:44:08 +00:00
let
pythonBuildInputs = [ click lark-parser ];
pythonWithBuildInputs = python.withPackages (_: pythonBuildInputs);
in
2021-10-01 18:16:51 +00:00
buildPythonApplication {
pname = "agtest";
version = "0.1.0";
2021-10-01 18:44:08 +00:00
propagatedBuildInputs = pythonBuildInputs;
checkInputs = [ mypy ];
2021-10-01 18:16:51 +00:00
src = nix-gitignore.gitignoreSource [] ./.;
2021-10-01 18:44:08 +00:00
checkPhase = ''
(cd src; mypy \
--python-executable ${pythonWithBuildInputs}/bin/python \
--strict agtest)
'';
2021-10-01 18:16:51 +00:00
}