nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonAtLeast,
6 toolz,
7 multipledispatch,
8 py,
9 pytestCheckHook,
10 pytest-html,
11 pytest-benchmark,
12 setuptools,
13 setuptools-scm,
14}:
15
16buildPythonPackage rec {
17 pname = "logical-unification";
18 version = "0.4.7";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "pythological";
23 repo = "unification";
24 tag = "v${version}";
25 hash = "sha256-m1wB7WOGb/io4Z7Zfl/rckh08j6IKSiiwFKMvl5UzHg=";
26 };
27
28 build-system = [
29 setuptools
30 setuptools-scm
31 ];
32
33 dependencies = [
34 toolz
35 multipledispatch
36 ];
37
38 nativeCheckInputs = [
39 py
40 pytestCheckHook
41 pytest-html
42 pytest-benchmark # Needed for the `--benchmark-skip` flag
43 ];
44
45 disabledTests = lib.optionals (pythonAtLeast "3.12") [
46 # Failed: DID NOT RAISE <class 'RecursionError'>
47 "test_reify_recursion_limit"
48 ];
49
50 pytestFlags = [
51 "--benchmark-skip"
52 "--html=testing-report.html"
53 "--self-contained-html"
54 ];
55
56 pythonImportsCheck = [ "unification" ];
57
58 meta = {
59 description = "Straightforward unification in Python that's extensible via generic functions";
60 homepage = "https://github.com/pythological/unification";
61 changelog = "https://github.com/pythological/unification/releases";
62 license = lib.licenses.bsd3;
63 maintainers = with lib.maintainers; [ Etjean ];
64 };
65}