2018-10-11 00:31:31 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
2019-08-26 07:15:52 +01:00
|
|
|
, fetchFromGitHub
|
2018-10-11 00:31:31 +01:00
|
|
|
, ansible
|
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-ansible";
|
2019-08-26 07:15:52 +01:00
|
|
|
version = "2.1.1";
|
2018-10-11 00:31:31 +01:00
|
|
|
|
2019-08-26 07:15:52 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ansible";
|
|
|
|
repo = "pytest-ansible";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0v97sqk3q2vkmwnjlnncz8ss8086x9jg3cz0g2nzlngs4ql1gdb0";
|
2018-10-11 00:31:31 +01: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 07:15:52 +01:00
|
|
|
# tests not included with release, even on github
|
2018-10-11 00:31:31 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
checkPhase = ''
|
2019-08-26 07:15:52 +01:00
|
|
|
HOME=$TMPDIR pytest tests/
|
2018-10-11 00:31:31 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/jlaska/pytest-ansible";
|
2018-10-11 00:31:31 +01:00
|
|
|
description = "Plugin for py.test to simplify calling ansible modules from tests or fixtures";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|