lol

python311Packages.dirty-equals: run tests in passthru.tests

to escape infinite recursion with pydantic.

+37 -32
+37 -32
pkgs/development/python-modules/dirty-equals/default.nix
··· 9 9 , pytz 10 10 }: 11 11 12 - buildPythonPackage rec { 13 - pname = "dirty-equals"; 14 - version = "0.7.0"; 15 - format = "pyproject"; 12 + let 13 + dirty-equals = buildPythonPackage rec { 14 + pname = "dirty-equals"; 15 + version = "0.7.0"; 16 + format = "pyproject"; 16 17 17 - disabled = pythonOlder "3.8"; 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 + }; 18 26 19 - src = fetchFromGitHub { 20 - owner = "samuelcolvin"; 21 - repo = pname; 22 - rev = "refs/tags/v${version}"; 23 - hash = "sha256-ShbkPGj1whOQ11bFLUSTfvVEVlvc3JUzRDICbBohgMM="; 24 - }; 27 + nativeBuildInputs = [ 28 + hatchling 29 + ]; 25 30 26 - nativeBuildInputs = [ 27 - hatchling 28 - ]; 31 + propagatedBuildInputs = [ 32 + pytz 33 + ]; 29 34 30 - propagatedBuildInputs = [ 31 - pytz 32 - ]; 35 + doCheck = false; 36 + passthru.tests.pytest = dirty-equals.overrideAttrs { doCheck = true; }; 33 37 34 - nativeCheckInputs = [ 35 - pydantic 36 - pytest-examples 37 - pytestCheckHook 38 - ]; 38 + nativeCheckInputs = [ 39 + pydantic 40 + pytest-examples 41 + pytestCheckHook 42 + ]; 39 43 40 - pythonImportsCheck = [ 41 - "dirty_equals" 42 - ]; 44 + pythonImportsCheck = [ 45 + "dirty_equals" 46 + ]; 43 47 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/v${version}"; 48 - license = with licenses; [ mit ]; 49 - maintainers = with maintainers; [ fab ]; 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 + }; 50 55 }; 51 - } 56 + in dirty-equals