1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, mako
6, parse
7, parse-type
8, poetry-core
9, pytest
10, pytestCheckHook
11, pythonOlder
12, typing-extensions
13}:
14
15buildPythonPackage rec {
16 pname = "pytest-bdd";
17 version = "6.1.1";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "pytest-dev";
24 repo = pname;
25 rev = "refs/tags/${version}";
26 hash = "sha256-+76jIgfDQPdIoesTr1+QUu8wmOnrdf4KT+TJr9F2Hqk=";
27 };
28
29 patches = [
30 (fetchpatch {
31 name = "remove-setuptools.patch";
32 url = "https://github.com/pytest-dev/pytest-bdd/commit/5d8eda3a30b47d3bd27849884a851adafca765cb.patch";
33 hash = "sha256-G2WHaRKlQ9HINufh8wl7+ly7HfDGobMLzzlbwDwd+o8=";
34 })
35 ];
36
37 nativeBuildInputs = [
38 poetry-core
39 ];
40
41 buildInputs = [
42 pytest
43 ];
44
45 propagatedBuildInputs = [
46 mako
47 parse
48 parse-type
49 typing-extensions
50 ];
51
52 nativeCheckInputs = [
53 pytestCheckHook
54 ];
55
56 preCheck = ''
57 export PATH=$PATH:$out/bin
58 '';
59
60 pythonImportsCheck = [
61 "pytest_bdd"
62 ];
63
64 meta = with lib; {
65 description = "BDD library for the pytest";
66 homepage = "https://github.com/pytest-dev/pytest-bdd";
67 license = licenses.mit;
68 maintainers = with maintainers; [ jm2dev ];
69 };
70}