2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
ansible-core,
|
|
|
|
flaky,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pyyaml,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
subprocess-tee,
|
|
|
|
pythonOlder,
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ansible-compat";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "4.1.11";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2022-03-30 09:31:56 +00:00
|
|
|
|
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;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-s+n518OhzmIi3kROncb+zn66cKxk8qC+/cTi1UIBi0o=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
setuptools
|
2022-03-30 09:31:56 +00:00
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2022-03-30 09:31:56 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +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
|
|
|
};
|
|
|
|
}
|