1{ stdenv, fetchPypi
2, buildPythonApplication, python, pythonAtLeast
3, mock, nose, pyhamcrest
4, glibcLocales, parse, parse-type, six
5}:
6buildPythonApplication rec {
7 pname = "behave";
8 version = "1.2.5";
9 name = "${pname}-${version}";
10
11 disabled = pythonAtLeast "3.6";
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "81b731ac5187e31e4aad2594944fa914943683a9818320846d037c5ebd6d5d0b";
16 };
17
18 checkInputs = [ mock nose pyhamcrest ];
19 buildInputs = [ glibcLocales ];
20 propagatedBuildInputs = [ parse parse-type six ];
21
22 postPatch = ''
23 patchShebangs bin
24 '';
25
26 doCheck = true;
27
28 checkPhase = ''
29 export LANG="en_US.UTF-8"
30 export LC_ALL="en_US.UTF-8"
31
32 nosetests -x
33
34 ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' features/
35 ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' tools/test-features/
36 ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' issue.features/
37 '';
38
39 meta = with stdenv.lib; {
40 homepage = https://github.com/behave/behave;
41 description = "behaviour-driven development, Python style";
42 license = licenses.bsd2;
43 maintainers = with maintainers; [ alunduil ];
44 };
45}