diff --git a/pkgs/development/python-modules/bundlewrap/default.nix b/pkgs/development/python-modules/bundlewrap/default.nix new file mode 100644 index 000000000000..9886a53eb3dc --- /dev/null +++ b/pkgs/development/python-modules/bundlewrap/default.nix @@ -0,0 +1,52 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, cryptography +, jinja2 +, Mako +, passlib +, pytest +, pyyaml +, requests +, rtoml +, setuptools +, tomlkit +, librouteros +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "bundlewrap"; + version = "4.15.0"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "bundlewrap"; + repo = "bundlewrap"; + rev = version; + sha256 = "sha256-O31lh43VyaFnd/IUkx44wsgxkWubZKzjsKXzHwcGox0"; + }; + + nativeBuildInputs = [ setuptools ]; + propagatedBuildInputs = [ + cryptography jinja2 Mako passlib pyyaml requests tomlkit librouteros + ] ++ lib.optional (pythonOlder "3.11") [ rtoml ]; + + pythonImportsCheck = [ "bundlewrap" ]; + + checkInputs = [ 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"; + license = [ licenses.gpl3 ] ; + maintainers = with maintainers; [ wamserma ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index af68606d049b..9606b7f18e1f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16430,6 +16430,8 @@ with pkgs; # until more issues are fixed default to libbpf 0.x libbpf = libbpf_0; + bundlewrap = with python3.pkgs; toPythonApplication bundlewrap; + bpftools = callPackage ../os-specific/linux/bpftools { }; bcc = callPackage ../os-specific/linux/bcc { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 382d5ff2b2ee..04f18f472e1f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1446,6 +1446,8 @@ self: super: with self; { bunch = callPackage ../development/python-modules/bunch { }; + bundlewrap = callPackage ../development/python-modules/bundlewrap { }; + bx-python = callPackage ../development/python-modules/bx-python { }; bwapy = callPackage ../development/python-modules/bwapy { };