2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ansible
|
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-ansible";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "2.2.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ansible";
|
|
|
|
repo = "pytest-ansible";
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "0vr015msciwzz20zplxalfmfx5hbg8rkf8vwjdg3z12fba8z8ks4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i "s/'setuptools-markdown'//g" setup.py
|
|
|
|
'';
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# requires pandoc < 2.0
|
|
|
|
# buildInputs = [ setuptools-markdown ];
|
|
|
|
checkInputs = [ mock ];
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [ ansible ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# tests not included with release, even on github
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
HOME=$TMPDIR pytest tests/
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/jlaska/pytest-ansible";
|
|
|
|
description = "Plugin for py.test to simplify calling ansible modules from tests or fixtures";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|