depot/third_party/nixpkgs/pkgs/development/python-modules/chess/default.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

37 lines
855 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, pythonOlder
}:
buildPythonPackage rec {
pname = "chess";
version = "1.9.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "niklasf";
repo = "python-${pname}";
rev = "refs/tags/v${version}";
hash = "sha256-YBABB//53gwJIwrmKJh8W+05hTBhl+49vCYv9//4E+0=";
};
pythonImportsCheck = [
"chess"
];
checkPhase = ''
${python.interpreter} ./test.py -v
'';
meta = with lib; {
description = "A chess library with move generation, move validation, and support for common formats";
homepage = "https://github.com/niklasf/python-chess";
changelog = "https://github.com/niklasf/python-chess/blob/v${version}/CHANGELOG.rst";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ smancill ];
};
}