agtest/default.nix
2021-10-01 13:44:08 -05:00

20 lines
518 B
Nix

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