2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-04-27 09:35:20 +00:00
|
|
|
, ansible-core
|
2022-03-30 09:31:56 +00:00
|
|
|
, flaky
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pyyaml
|
|
|
|
, setuptools-scm
|
|
|
|
, subprocess-tee
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonOlder
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ansible-compat";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "4.1.5";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-WXyDahhMETH+62sOI82iNsQf7N7mRCc3Unj7aSD9LnQ=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
subprocess-tee
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
export PATH=$PATH:$out/bin
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
ansible-core
|
2022-03-30 09:31:56 +00:00
|
|
|
flaky
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# require network
|
|
|
|
"test_prepare_environment_with_collections"
|
|
|
|
"test_prerun_reqs_v1"
|
|
|
|
"test_prerun_reqs_v2"
|
|
|
|
"test_require_collection_wrong_version"
|
|
|
|
"test_require_collection"
|
|
|
|
"test_install_collection"
|
|
|
|
"test_install_collection_dest"
|
|
|
|
"test_upgrade_collection"
|
|
|
|
"test_require_collection_no_cache_dir"
|
|
|
|
"test_runtime"
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"ansible_compat"
|
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-05-24 13:37:59 +00:00
|
|
|
description = "Function collection that help interacting with various versions of Ansible";
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://github.com/ansible/ansible-compat";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/ansible/ansible-compat/releases/tag/v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = licenses.mit;
|
2022-11-02 22:02:43 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
}
|