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