nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "chess";
11 version = "1.11.2";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "niklasf";
16 repo = "python-${pname}";
17 tag = "v${version}";
18 hash = "sha256-8LOp4HQI9UOdaj4/jwd79ftdnaO4HtzMVf1cwcYFCiA=";
19 };
20
21 build-system = [ setuptools ];
22
23 pythonImportsCheck = [ "chess" ];
24
25 nativeCheckInputs = [ pytestCheckHook ];
26
27 enabledTestPaths = [ "test.py" ];
28
29 meta = {
30 description = "Chess library with move generation, move validation, and support for common formats";
31 homepage = "https://github.com/niklasf/python-chess";
32 changelog = "https://github.com/niklasf/python-chess/blob/${src.tag}/CHANGELOG.rst";
33 license = lib.licenses.gpl3Plus;
34 maintainers = with lib.maintainers; [ smancill ];
35 };
36}