nixpkgs/pkgs/development/python-modules/chess/default.nix

34 lines
738 B
Nix
Raw Normal View History

2021-08-11 20:23:01 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, pythonOlder
}:
buildPythonPackage rec {
pname = "chess";
2021-12-23 19:50:17 +00:00
version = "1.8.0";
2021-08-11 20:23:01 +00:00
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "niklasf";
repo = "python-${pname}";
rev = "v${version}";
2021-12-23 19:50:17 +00:00
sha256 = "sha256-ghBX0yRnggXliVREtrGxB/Xf0JWICeIi8XriSxS26Go=";
2021-08-11 20:23:01 +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;
};
}