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