2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-10-09 16:51:18 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonOlder,
|
2024-10-09 16:51:18 +00:00
|
|
|
pytestCheckHook,
|
2021-08-18 13:19:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "chess";
|
2024-10-09 16:51:18 +00:00
|
|
|
version = "1.11.0";
|
|
|
|
pyproject = true;
|
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}";
|
2024-10-09 16:51:18 +00:00
|
|
|
hash = "sha256-+YNEm1QppXeeIjOKfCSQoQmuSzBsW4ws0ej/whjTAPg=";
|
2021-08-18 13:19:15 +00:00
|
|
|
};
|
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "chess" ];
|
2021-08-18 13:19:15 +00:00
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "test.py" ];
|
2021-08-18 13:19:15 +00:00
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|