1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, logical-unification
5, py
6, pytestCheckHook
7, pytest-html
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "cons";
13 version = "0.4.6";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "pythological";
20 repo = "python-cons";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-XssERKiv4A8x7dZhLeFSciN6RCEfGs0or3PAQiYSPII=";
23 };
24
25 propagatedBuildInputs = [
26 logical-unification
27 ];
28
29 nativeCheckInputs = [
30 py
31 pytestCheckHook
32 pytest-html
33 ];
34
35 pytestFlagsArray = [
36 "--html=testing-report.html"
37 "--self-contained-html"
38 ];
39
40 pythonImportsCheck = [ "cons" ];
41
42 meta = with lib; {
43 description = "An implementation of Lisp/Scheme-like cons in Python";
44 homepage = "https://github.com/pythological/python-cons";
45 changelog = "https://github.com/pythological/python-cons/releases/tag/v${version}";
46 license = licenses.gpl3Only;
47 maintainers = with maintainers; [ Etjean ];
48 };
49}