Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 buildPythonPackage, 6 python, 7 pytestCheckHook, 8 mock, 9 path, 10 pyhamcrest, 11 pytest-html, 12 glibcLocales, 13 colorama, 14 cucumber-tag-expressions, 15 parse, 16 parse-type, 17 six, 18}: 19 20buildPythonPackage rec { 21 pname = "behave"; 22 version = "1.2.7.dev2"; 23 format = "setuptools"; 24 25 src = fetchFromGitHub { 26 owner = "behave"; 27 repo = pname; 28 rev = "v${version}"; 29 hash = "sha256-B8PUN1Q4UAsDWrHjPZDlpaPjCKjI/pAogCSI+BQnaWs="; 30 }; 31 32 nativeCheckInputs = [ 33 pytestCheckHook 34 mock 35 path 36 pyhamcrest 37 pytest-html 38 ]; 39 40 # upstream tests are failing, so instead we only check if we can import it 41 doCheck = false; 42 43 pythonImportsCheck = [ "behave" ]; 44 45 buildInputs = [ glibcLocales ]; 46 propagatedBuildInputs = [ 47 colorama 48 cucumber-tag-expressions 49 parse 50 parse-type 51 six 52 ]; 53 54 postPatch = '' 55 patchShebangs bin 56 ''; 57 58 # timing-based test flaky on Darwin 59 # https://github.com/NixOS/nixpkgs/pull/97737#issuecomment-691489824 60 disabledTests = lib.optionals stdenv.isDarwin [ "test_step_decorator_async_run_until_complete" ]; 61 62 postCheck = '' 63 export LANG="en_US.UTF-8" 64 export LC_ALL="en_US.UTF-8" 65 66 ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' features/ 67 ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' tools/test-features/ 68 ${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' issue.features/ 69 ''; 70 71 meta = with lib; { 72 homepage = "https://github.com/behave/behave"; 73 description = "behaviour-driven development, Python style"; 74 mainProgram = "behave"; 75 license = licenses.bsd2; 76 maintainers = with maintainers; [ 77 alunduil 78 maxxk 79 ]; 80 }; 81}