1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 pydantic,
7 pytest-examples,
8 pytestCheckHook,
9 pythonOlder,
10 pytz,
11}:
12
13let
14 dirty-equals = buildPythonPackage rec {
15 pname = "dirty-equals";
16 version = "0.9.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "samuelcolvin";
23 repo = "dirty-equals";
24 tag = "v${version}";
25 hash = "sha256-V+Ef/X4xQNSp2PiiXHHIAZT7v2sjU4vDBd9hNOqiRQw=";
26 };
27
28 build-system = [ hatchling ];
29
30 dependencies = [ pytz ];
31
32 doCheck = false;
33
34 passthru.tests.pytest = dirty-equals.overrideAttrs { doCheck = true; };
35
36 nativeCheckInputs = [
37 pydantic
38 pytest-examples
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [ "dirty_equals" ];
43
44 meta = with lib; {
45 description = "Module for doing dirty (but extremely useful) things with equals";
46 homepage = "https://github.com/samuelcolvin/dirty-equals";
47 changelog = "https://github.com/samuelcolvin/dirty-equals/releases/tag/${src.tag}";
48 license = with licenses; [ mit ];
49 maintainers = with maintainers; [ fab ];
50 };
51 };
52in
53dirty-equals