1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, pythonOlder
5, cryptography
6, jinja2
7, mako
8, passlib
9, pytest
10, pyyaml
11, requests
12, rtoml
13, setuptools
14, tomlkit
15, librouteros
16, pytestCheckHook
17}:
18
19buildPythonPackage rec {
20 pname = "bundlewrap";
21 version = "4.17.2";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchFromGitHub {
27 owner = "bundlewrap";
28 repo = "bundlewrap";
29 rev = "refs/tags/${version}";
30 hash = "sha256-0yg8+OflTF3pNYz2TPNUW8ubTZjrEgtihV/21PpJUlM=";
31 };
32
33 nativeBuildInputs = [ setuptools ];
34 propagatedBuildInputs = [
35 setuptools cryptography jinja2 mako passlib pyyaml requests tomlkit librouteros
36 ] ++ lib.optionals (pythonOlder "3.11") [ rtoml ];
37
38 pythonImportsCheck = [ "bundlewrap" ];
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 pytestFlagsArray = [
43 # only unit tests as integration tests need a OpenSSH client/server setup
44 "tests/unit"
45 ];
46
47 meta = with lib; {
48 homepage = "https://bundlewrap.org/";
49 description = "Easy, Concise and Decentralized Config management with Python";
50 license = [ licenses.gpl3 ] ;
51 maintainers = with maintainers; [ wamserma ];
52 };
53}