diff --git a/pkgs/development/python-modules/approvaltests/default.nix b/pkgs/development/python-modules/approvaltests/default.nix index ece87d1894e0..a6c94f244425 100644 --- a/pkgs/development/python-modules/approvaltests/default.nix +++ b/pkgs/development/python-modules/approvaltests/default.nix @@ -1,36 +1,58 @@ -{ lib, buildPythonPackage, fetchFromGitHub +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder + +# propagates +, allpairspy , beautifulsoup4 , empty-files -, numpy , pyperclip , pytest + +# tests +, numpy +, pytestCheckHook }: buildPythonPackage rec { - version = "4.0.0"; + version = "5.0.0"; pname = "approvaltests"; + format = "setuptools"; + + disabled = pythonOlder "3.6.1"; # no tests included in PyPI tarball src = fetchFromGitHub { owner = "approvals"; repo = "ApprovalTests.Python"; rev = "v${version}"; - sha256 = "sha256-4dg5xTswqLFRBaZagKrkilCvsAnky9donb03MT/PiWM="; + sha256 = "sha256-ku8J1ccX6LZZitlAOgc3eNCdsFx/FP1nqtdgPJF/jRg="; }; propagatedBuildInputs = [ + allpairspy beautifulsoup4 empty-files - numpy pyperclip pytest ]; - postPatch = '' - substituteInPlace setup.py \ - --replace bs4 beautifulsoup4 \ - --replace "pyperclip==1.5.27" "pyperclip>=1.5.27" - ''; + checkInputs = [ + numpy + pytestCheckHook + ]; + + disabledTests = [ + # tests expects paths below ApprovalTests.Python directory + "test_received_filename" + "test_pytest_namer" + ]; + + pythonImportsCheck = [ + "approvaltests.approvals" + "approvaltests.reporters.generic_diff_reporter_factory" + ]; meta = with lib; { description = "Assertion/verification library to aid testing";