1{lib, buildPythonPackage, fetchPypi, pytest, cram, bash, writeText}: 2 3buildPythonPackage rec { 4 version = "0.2.0"; 5 pname = "pytest-cram"; 6 7 buildInputs = [ pytest ]; 8 propagatedBuildInputs = [ cram ]; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "006p5dr3q794sbwwmxmdls3nwq0fvnyrxxmc03pgq8n74chl71qn"; 13 extension = "zip"; 14 }; 15 16 postPatch = '' 17 substituteInPlace pytest_cram/tests/test_options.py \ 18 --replace "/bin/bash" "${bash}/bin/bash" 19 ''; 20 21 # Remove __init__.py from tests folder, otherwise pytest raises an error that 22 # the imported and collected modules are different. 23 checkPhase = '' 24 rm pytest_cram/tests/__init__.py 25 pytest pytest_cram 26 ''; 27 28 meta = { 29 description = "Test command-line applications with pytest and cram"; 30 homepage = https://github.com/tbekolay/pytest-cram; 31 license = lib.licenses.mit; 32 maintainers = with lib.maintainers; [ jluttine ]; 33 }; 34}