Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, installShellFiles 5, ansible 6, cryptography 7, jinja2 8, junit-xml 9, lxml 10, ncclient 11, packaging 12, paramiko 13, passlib 14, pexpect 15, psutil 16, pycrypto 17, pyyaml 18, requests 19, resolvelib 20, scp 21, windowsSupport ? false, pywinrm 22, xmltodict 23}: 24 25buildPythonPackage rec { 26 pname = "ansible-core"; 27 version = "2.15.0"; 28 29 src = fetchPypi { 30 inherit pname version; 31 hash = "sha256-z2kP1Ou0BZDgDFrNwGJHWMpMWNHksrAuwCagNAcOv00="; 32 }; 33 34 # ansible_connection is already wrapped, so don't pass it through 35 # the python interpreter again, as it would break execution of 36 # connection plugins. 37 postPatch = '' 38 substituteInPlace lib/ansible/executor/task_executor.py \ 39 --replace "[python," "[" 40 ''; 41 42 nativeBuildInputs = [ 43 installShellFiles 44 ]; 45 46 propagatedBuildInputs = [ 47 # depend on ansible instead of the other way around 48 ansible 49 # from requirements.txt 50 cryptography 51 jinja2 52 packaging 53 passlib 54 pyyaml 55 resolvelib # This library is a PITA, since ansible requires a very old version of it 56 # optional dependencies 57 junit-xml 58 lxml 59 ncclient 60 paramiko 61 pexpect 62 psutil 63 pycrypto 64 requests 65 scp 66 xmltodict 67 ] ++ lib.optional windowsSupport pywinrm; 68 69 postInstall = '' 70 installManPage docs/man/man1/*.1 71 ''; 72 73 # internal import errors, missing dependencies 74 doCheck = false; 75 76 meta = with lib; { 77 changelog = "https://github.com/ansible/ansible/blob/v${version}/changelogs/CHANGELOG-v${lib.versions.majorMinor version}.rst"; 78 description = "Radically simple IT automation"; 79 homepage = "https://www.ansible.com"; 80 license = licenses.gpl3Plus; 81 maintainers = with maintainers; [ ]; 82 }; 83}