1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, ansible
5, pytest
6, mock
7}:
8
9buildPythonPackage rec {
10 pname = "pytest-ansible";
11 version = "2.2.4";
12
13 src = fetchFromGitHub {
14 owner = "ansible";
15 repo = "pytest-ansible";
16 rev = "v${version}";
17 sha256 = "0vr015msciwzz20zplxalfmfx5hbg8rkf8vwjdg3z12fba8z8ks4";
18 };
19
20 patchPhase = ''
21 sed -i "s/'setuptools-markdown'//g" setup.py
22 '';
23
24 buildInputs = [ pytest ];
25
26 # requires pandoc < 2.0
27 # buildInputs = [ setuptools-markdown ];
28 checkInputs = [ mock ];
29 propagatedBuildInputs = [ ansible ];
30
31 # tests not included with release, even on github
32 doCheck = false;
33
34 checkPhase = ''
35 HOME=$TMPDIR pytest tests/
36 '';
37
38 meta = with lib; {
39 homepage = "https://github.com/jlaska/pytest-ansible";
40 description = "Plugin for py.test to simplify calling ansible modules from tests or fixtures";
41 license = licenses.mit;
42 maintainers = [ maintainers.costrouc ];
43 };
44}