From aebb003f2f9b40823ea6da62dea6945f92c9722f Mon Sep 17 00:00:00 2001 From: Johan Geluk Date: Sat, 5 Aug 2023 17:13:24 +0200 Subject: [PATCH] pythonPackages.ansible-pylibssh: init at 1.1.0 This allows usage of pylibssh in Ansible instead of paramiko. --- .../ansible-pylibssh/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/ansible-pylibssh/default.nix diff --git a/pkgs/development/python-modules/ansible-pylibssh/default.nix b/pkgs/development/python-modules/ansible-pylibssh/default.nix new file mode 100644 index 000000000000..5eb60419fcf7 --- /dev/null +++ b/pkgs/development/python-modules/ansible-pylibssh/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, libssh +, cython +, wheel +, setuptools +, setuptools-scm +, toml +, expandvars +}: + +buildPythonPackage rec { + pname = "ansible-pylibssh"; + version = "1.1.0"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-spaGux6dYvtUtpOdU6oN7SEn8IgBof2NpQSPvr+Zplg="; + }; + + nativeBuildInputs = [ + cython + wheel + setuptools + setuptools-scm + toml + expandvars + ]; + + propagatedBuildInputs = [ + libssh + ]; + + pythonImportsCheck = [ + "pylibsshext" + ]; + + meta = with lib; { + description = "Python bindings to client functionality of libssh specific to Ansible use case"; + homepage = "https://github.com/ansible/pylibssh"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ geluk ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 96d0ff2a24eb..36c7f74c6614 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -522,6 +522,8 @@ self: super: with self; { ansible-kernel = callPackage ../development/python-modules/ansible-kernel { }; + ansible-pylibssh = callPackage ../development/python-modules/ansible-pylibssh { }; + ansible-runner = callPackage ../development/python-modules/ansible-runner { }; ansible-vault-rw = callPackage ../development/python-modules/ansible-vault-rw { };