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