2021-08-18 13:19:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "chess";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "1.9.1";
|
2021-08-18 13:19:15 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "niklasf";
|
|
|
|
repo = "python-${pname}";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-sJ5mw9sQQn2IP7iDjYUGf6P3FqAbHJC1R4phnwVcNIM=";
|
2021-08-18 13:19:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "chess" ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} ./test.py -v
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A chess library for Python, with move generation, move validation, and support for common formats";
|
|
|
|
homepage = "https://github.com/niklasf/python-chess";
|
|
|
|
maintainers = with maintainers; [ smancill ];
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
};
|
|
|
|
}
|