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