4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
47 lines
1.4 KiB
Nix
47 lines
1.4 KiB
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, buildPythonApplication, python
|
|
, pytestCheckHook, mock, pathpy, pyhamcrest, pytest-html
|
|
, glibcLocales
|
|
, colorama, cucumber-tag-expressions, parse, parse-type, six
|
|
}:
|
|
|
|
buildPythonApplication rec {
|
|
pname = "behave";
|
|
version = "1.2.7.dev1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "behave";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1ssgixmqlg8sxsyalr83a1970njc2wg3zl8idsmxnsljwacv7qwv";
|
|
};
|
|
|
|
checkInputs = [ pytestCheckHook mock pathpy pyhamcrest pytest-html ];
|
|
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 = stdenv.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 ];
|
|
};
|
|
}
|