1{ stdenv, buildPythonPackage, fetchPypi 2, pytest, django, setuptools_scm 3, fetchpatch 4}: 5buildPythonPackage rec { 6 pname = "pytest-django"; 7 version = "3.1.2"; 8 9 src = fetchPypi { 10 inherit pname version; 11 sha256 = "02932m2sr8x22m4az8syr8g835g4ak77varrnw71n6xakmdcr303"; 12 }; 13 14 buildInputs = [ pytest setuptools_scm ]; 15 propagatedBuildInputs = [ django ]; 16 17 patches = [ 18 # Unpin setuptools-scm 19 (fetchpatch { 20 url = "https://github.com/pytest-dev/pytest-django/commit/25cbc3b395dcdeb92bdc9414e296680c2b9d602e.patch"; 21 sha256 = "0mz3rcsv44pfzlxy3pv8mx87glmv34gy0d5aknvbzgb2a9niryws"; 22 }) 23 ]; 24 25 # Complicated. Requires Django setup. 26 doCheck = false; 27 28 meta = with stdenv.lib; { 29 description = "py.test plugin for testing of Django applications"; 30 homepage = http://pytest-django.readthedocs.org/en/latest/; 31 license = licenses.bsd3; 32 }; 33}