Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 51 lines 1.5 kB view raw
1{ stdenv, fetchPypi, fetchpatch 2, buildPythonApplication, python, pythonOlder 3, mock, nose, pathpy, pyhamcrest, pytest 4, glibcLocales, parse, parse-type, six 5, traceback2 6}: 7buildPythonApplication rec { 8 pname = "behave"; 9 version = "1.2.6"; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "11hsz365qglvpp1m1w16239c3kiw15lw7adha49lqaakm8kj6rmr"; 14 }; 15 16 patches = [ 17 # Fix tests on Python 2.7 18 (fetchpatch { 19 url = https://github.com/behave/behave/commit/0a9430a94881cd18437deb03d2ae23afea0f009c.patch; 20 sha256 = "1nrh9ii6ik6gw2kjh8a6jk4mg5yqw3jfjfllbyxardclsab62ydy"; 21 }) 22 ]; 23 24 checkInputs = [ mock nose pathpy pyhamcrest pytest ]; 25 buildInputs = [ glibcLocales ]; 26 propagatedBuildInputs = [ parse parse-type six ] ++ stdenv.lib.optional (pythonOlder "3.0") traceback2; 27 28 postPatch = '' 29 patchShebangs bin 30 ''; 31 32 doCheck = true; 33 34 checkPhase = '' 35 export LANG="en_US.UTF-8" 36 export LC_ALL="en_US.UTF-8" 37 38 pytest test tests 39 40 ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' features/ 41 ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' tools/test-features/ 42 ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' issue.features/ 43 ''; 44 45 meta = with stdenv.lib; { 46 homepage = https://github.com/behave/behave; 47 description = "behaviour-driven development, Python style"; 48 license = licenses.bsd2; 49 maintainers = with maintainers; [ alunduil ]; 50 }; 51}