1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 python,
6 pythonOlder,
7}:
8
9buildPythonPackage rec {
10 pname = "chess";
11 version = "1.10.0";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "niklasf";
18 repo = "python-${pname}";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-jfPg1W9Qp0DlAbMXaFqZ6Ri2zMOW6EKUHwi7Azn/yl0=";
21 };
22
23 pythonImportsCheck = [ "chess" ];
24
25 checkPhase = ''
26 ${python.interpreter} ./test.py -v
27 '';
28
29 meta = with lib; {
30 description = "Chess library with move generation, move validation, and support for common formats";
31 homepage = "https://github.com/niklasf/python-chess";
32 changelog = "https://github.com/niklasf/python-chess/blob/v${version}/CHANGELOG.rst";
33 license = licenses.gpl3Plus;
34 maintainers = with maintainers; [ smancill ];
35 };
36}