mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 17:43:42 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
53 lines
1.6 KiB
Nix
53 lines
1.6 KiB
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, buildPythonPackage, python
|
|
, pytestCheckHook, mock, path, pyhamcrest, pytest-html
|
|
, glibcLocales
|
|
, colorama, cucumber-tag-expressions, parse, parse-type, six
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "behave";
|
|
version = "1.2.7.dev2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "behave";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-B8PUN1Q4UAsDWrHjPZDlpaPjCKjI/pAogCSI+BQnaWs=";
|
|
};
|
|
|
|
nativeCheckInputs = [ pytestCheckHook mock path pyhamcrest pytest-html ];
|
|
|
|
# upstream tests are failing, so instead we only check if we can import it
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "behave" ];
|
|
|
|
buildInputs = [ glibcLocales ];
|
|
propagatedBuildInputs = [ colorama cucumber-tag-expressions parse parse-type six ];
|
|
|
|
postPatch = ''
|
|
patchShebangs bin
|
|
'';
|
|
|
|
# timing-based test flaky on Darwin
|
|
# https://github.com/NixOS/nixpkgs/pull/97737#issuecomment-691489824
|
|
disabledTests = lib.optionals stdenv.isDarwin [ "test_step_decorator_async_run_until_complete" ];
|
|
|
|
postCheck = ''
|
|
export LANG="en_US.UTF-8"
|
|
export LC_ALL="en_US.UTF-8"
|
|
|
|
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' features/
|
|
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' tools/test-features/
|
|
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' issue.features/
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/behave/behave";
|
|
description = "behaviour-driven development, Python style";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ alunduil maxxk ];
|
|
};
|
|
}
|