1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 ansible-core, 6 flaky, 7 pytest-mock, 8 pytestCheckHook, 9 pyyaml, 10 setuptools, 11 setuptools-scm, 12 subprocess-tee, 13 pythonOlder, 14}: 15 16buildPythonPackage rec { 17 pname = "ansible-compat"; 18 version = "4.1.11"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchPypi { 24 inherit pname version; 25 hash = "sha256-s+n518OhzmIi3kROncb+zn66cKxk8qC+/cTi1UIBi0o="; 26 }; 27 28 nativeBuildInputs = [ 29 setuptools 30 setuptools-scm 31 ]; 32 33 dependencies = [ 34 pyyaml 35 subprocess-tee 36 ]; 37 38 preCheck = '' 39 export HOME=$(mktemp -d) 40 export PATH=$PATH:$out/bin 41 ''; 42 43 nativeCheckInputs = [ 44 ansible-core 45 flaky 46 pytest-mock 47 pytestCheckHook 48 ]; 49 50 disabledTests = [ 51 # require network 52 "test_prepare_environment_with_collections" 53 "test_prerun_reqs_v1" 54 "test_prerun_reqs_v2" 55 "test_require_collection_wrong_version" 56 "test_require_collection" 57 "test_install_collection" 58 "test_install_collection_dest" 59 "test_upgrade_collection" 60 "test_require_collection_no_cache_dir" 61 "test_runtime" 62 ]; 63 64 pythonImportsCheck = [ "ansible_compat" ]; 65 66 meta = with lib; { 67 description = "Function collection that help interacting with various versions of Ansible"; 68 homepage = "https://github.com/ansible/ansible-compat"; 69 changelog = "https://github.com/ansible/ansible-compat/releases/tag/v${version}"; 70 license = licenses.mit; 71 maintainers = with maintainers; [ ]; 72 }; 73}