1{
2 lib,
3 buildPythonPackage,
4 click,
5 colorama,
6 configparser,
7 distro,
8 fetchFromGitHub,
9 fetchpatch,
10 gevent,
11 jinja2,
12 paramiko,
13 pytestCheckHook,
14 python-dateutil,
15 pythonOlder,
16 pywinrm,
17 pyyaml,
18 setuptools,
19}:
20
21buildPythonPackage rec {
22 pname = "pyinfra";
23 version = "2.9.2";
24 format = "setuptools";
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "Fizzadar";
30 repo = pname;
31 rev = "refs/tags/v${version}";
32 hash = "sha256-lzbFwAg1aLCfBnSnqq4oVteArpkRBa7hU8V3vB5ODa8=";
33 };
34
35 propagatedBuildInputs = [
36 click
37 colorama
38 configparser
39 distro
40 gevent
41 jinja2
42 paramiko
43 python-dateutil
44 pywinrm
45 pyyaml
46 setuptools
47 ];
48
49 nativeCheckInputs = [ pytestCheckHook ];
50
51 pythonImportsCheck = [ "pyinfra" ];
52
53 disabledTests = [
54 # Test requires SSH binary
55 "test_load_ssh_config"
56 ];
57
58 meta = with lib; {
59 description = "Python-based infrastructure automation";
60 mainProgram = "pyinfra";
61 longDescription = ''
62 pyinfra automates/provisions/manages/deploys infrastructure. It can be used for
63 ad-hoc command execution, service deployment, configuration management and more.
64 '';
65 homepage = "https://pyinfra.com";
66 downloadPage = "https://pyinfra.com/Fizzadar/pyinfra/releases";
67 changelog = "https://github.com/Fizzadar/pyinfra/blob/v${version}/CHANGELOG.md";
68 maintainers = with maintainers; [ totoroot ];
69 license = licenses.mit;
70 };
71}