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