1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 logical-unification,
6 py,
7 pytestCheckHook,
8 pytest-html,
9 setuptools,
10 setuptools-scm,
11}:
12
13buildPythonPackage rec {
14 pname = "cons";
15 version = "0.4.7";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "pythological";
20 repo = "python-cons";
21 tag = "v${version}";
22 hash = "sha256-BS7lThnv+dxtztvw2aRhQa8yx2cRfrZLiXjcwvZ8QR0=";
23 };
24
25 build-system = [
26 setuptools
27 setuptools-scm
28 ];
29
30 dependencies = [ logical-unification ];
31
32 nativeCheckInputs = [
33 py
34 pytestCheckHook
35 pytest-html
36 ];
37
38 pytestFlags = [
39 "--html=testing-report.html"
40 "--self-contained-html"
41 ];
42
43 pythonImportsCheck = [ "cons" ];
44
45 meta = with lib; {
46 description = "Implementation of Lisp/Scheme-like cons in Python";
47 homepage = "https://github.com/pythological/python-cons";
48 changelog = "https://github.com/pythological/python-cons/releases/tag/${src.tag}";
49 license = licenses.gpl3Only;
50 maintainers = with maintainers; [ Etjean ];
51 };
52}