2018-10-10 23:31:31 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
2019-08-26 06:15:52 +00:00
|
|
|
, fetchFromGitHub
|
2018-10-10 23:31:31 +00:00
|
|
|
, ansible
|
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-ansible";
|
2019-08-26 06:15:52 +00:00
|
|
|
version = "2.1.1";
|
2018-10-10 23:31:31 +00:00
|
|
|
|
2019-08-26 06:15:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ansible";
|
|
|
|
repo = "pytest-ansible";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0v97sqk3q2vkmwnjlnncz8ss8086x9jg3cz0g2nzlngs4ql1gdb0";
|
2018-10-10 23:31:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i "s/'setuptools-markdown'//g" setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# requires pandoc < 2.0
|
|
|
|
# buildInputs = [ setuptools-markdown ];
|
|
|
|
checkInputs = [ mock ];
|
|
|
|
propagatedBuildInputs = [ ansible pytest ];
|
|
|
|
|
2019-08-26 06:15:52 +00:00
|
|
|
# tests not included with release, even on github
|
2018-10-10 23:31:31 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
checkPhase = ''
|
2019-08-26 06:15:52 +00:00
|
|
|
HOME=$TMPDIR pytest tests/
|
2018-10-10 23:31:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2019-04-14 23:25:45 +00:00
|
|
|
homepage = https://github.com/jlaska/pytest-ansible;
|
2018-10-10 23:31:31 +00:00
|
|
|
description = "Plugin for py.test to simplify calling ansible modules from tests or fixtures";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|