2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
ansible-core,
|
2024-06-20 14:57:18 +00:00
|
|
|
coreutils,
|
2024-06-05 15:53:02 +00:00
|
|
|
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-09-19 14:19:46 +00:00
|
|
|
version = "24.9.0";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchPypi {
|
2024-06-20 14:57:18 +00:00
|
|
|
pname = "ansible_compat";
|
|
|
|
inherit version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-xaQqVt0hJiXPyx0x5RpuD1JZNpG94f5KeIgeixt4prg=";
|
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)
|
2024-06-20 14:57:18 +00:00
|
|
|
substituteInPlace test/test_runtime.py \
|
|
|
|
--replace-fail "printenv" "${coreutils}/bin/printenv"
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
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"
|
2024-06-20 14:57:18 +00:00
|
|
|
"test_runtime_has_playbook"
|
|
|
|
"test_runtime_plugins"
|
|
|
|
"test_scan_sys_path"
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
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;
|
2024-06-20 14:57:18 +00:00
|
|
|
maintainers = with maintainers; [ dawidd6 ];
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
}
|