Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 38 lines 1.2 kB view raw
1{ stdenv, buildPythonPackage, fetchFromGitHub, isPy37, pyperclip }: 2 3buildPythonPackage rec { 4 version = "0.2.4"; 5 pname = "approvaltests"; 6 7 # no tests included in PyPI tarball 8 src = fetchFromGitHub { 9 owner = "approvals"; 10 repo = "ApprovalTests.Python"; 11 rev = version; 12 sha256 = "05lj5i13zpkgw1wdc1v81wj4zqj8bpzqiwycdnwlg08azcy7k7j1"; 13 }; 14 15 propagatedBuildInputs = [ pyperclip ]; 16 17 postPatch = '' 18 substituteInPlace setup.py \ 19 --replace "pyperclip==1.5.27" "pyperclip>=1.5.27" 20 ''; 21 22 # Tests fail on Python 3.7 23 # https://github.com/approvals/ApprovalTests.Python/issues/36 24 doCheck = !isPy37; 25 26 # Disable Linux failing test, because tries to use darwin/windows specific reporters 27 preCheck = stdenv.lib.optionalString stdenv.isLinux '' 28 substituteInPlace tests/test_genericdiffreporter.py \ 29 --replace "test_find_working_reporter" "_find_working_reporter" 30 ''; 31 32 meta = with stdenv.lib; { 33 description = "Assertion/verification library to aid testing"; 34 homepage = https://github.com/approvals/ApprovalTests.Python; 35 license = licenses.asl20; 36 maintainers = [ maintainers.marsam ]; 37 }; 38}