summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/chess/default.nix
blob: c02828fc7c02d093e298c4c11e71eb2006c4e356 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "chess";
  version = "1.11.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "niklasf";
    repo = "python-${pname}";
    tag = "v${version}";
    hash = "sha256-8LOp4HQI9UOdaj4/jwd79ftdnaO4HtzMVf1cwcYFCiA=";
  };

  build-system = [ setuptools ];

  pythonImportsCheck = [ "chess" ];

  nativeCheckInputs = [ pytestCheckHook ];

  enabledTestPaths = [ "test.py" ];

  meta = {
    description = "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/${src.tag}/CHANGELOG.rst";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ smancill ];
  };
}