about summary refs log tree commit diff
path: root/pkgs/development/python-modules/bundlewrap/default.nix
blob: dcafcf1408483d2f2d1b4485645283cfbd701f9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  pythonOlder,
  cryptography,
  jinja2,
  mako,
  passlib,
  pytest,
  pyyaml,
  requests,
  rtoml,
  setuptools,
  tomlkit,
  librouteros,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "bundlewrap";
  version = "4.19.0";
  format = "setuptools";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "bundlewrap";
    repo = "bundlewrap";
    rev = "refs/tags/${version}";
    hash = "sha256-sNdtJRpP54xlkYis4whoGiJJ/Tjnrs4TW6EO3eAMBAo=";
  };

  nativeBuildInputs = [ setuptools ];
  propagatedBuildInputs = [
    setuptools
    cryptography
    jinja2
    mako
    passlib
    pyyaml
    requests
    tomlkit
    librouteros
  ] ++ lib.optionals (pythonOlder "3.11") [ rtoml ];

  pythonImportsCheck = [ "bundlewrap" ];

  nativeCheckInputs = [ pytestCheckHook ];

  pytestFlagsArray = [
    # only unit tests as integration tests need a OpenSSH client/server setup
    "tests/unit"
  ];

  meta = with lib; {
    homepage = "https://bundlewrap.org/";
    description = "Easy, Concise and Decentralized Config management with Python";
    mainProgram = "bw";
    license = [ licenses.gpl3 ];
    maintainers = with maintainers; [ wamserma ];
  };
}