2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
2021-08-18 13:19:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "chess";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "1.10.0";
|
2023-01-11 07:51:40 +00:00
|
|
|
format = "setuptools";
|
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}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-jfPg1W9Qp0DlAbMXaFqZ6Ri2zMOW6EKUHwi7Azn/yl0=";
|
2021-08-18 13:19:15 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "chess" ];
|
2021-08-18 13:19:15 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} ./test.py -v
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Chess library with move generation, move validation, and support for common formats";
|
2021-08-18 13:19:15 +00:00
|
|
|
homepage = "https://github.com/niklasf/python-chess";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/niklasf/python-chess/blob/v${version}/CHANGELOG.rst";
|
2021-08-18 13:19:15 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2023-01-11 07:51:40 +00:00
|
|
|
maintainers = with maintainers; [ smancill ];
|
2021-08-18 13:19:15 +00:00
|
|
|
};
|
|
|
|
}
|