about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/asyncssh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/asyncssh/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/asyncssh/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/asyncssh/default.nix b/nixpkgs/pkgs/development/python-modules/asyncssh/default.nix
new file mode 100644
index 000000000000..a078a4207163
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/asyncssh/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, fetchpatch
+, cryptography
+, bcrypt, gssapi, libnacl, libsodium, nettle, pyopenssl
+, openssl, openssh }:
+
+buildPythonPackage rec {
+  pname = "asyncssh";
+  version = "1.17.0";
+  disabled = pythonOlder "3.4";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1qrpkdyl77956qg6g7g66bbd6bfvb2nwi2sjy3v3li8m3irx8d7d";
+  };
+
+  patches = [
+    # Reverts https://github.com/ronf/asyncssh/commit/4b3dec994b3aa821dba4db507030b569c3a32730
+    #
+    # This changed the test to avoid setting the sticky bit
+    # because that's not allowed for plain files in FreeBSD.
+    # However that broke the test on NixOS, failing with
+    # "Operation not permitted"
+    ./fix-sftp-chmod-test-nixos.patch
+  ];
+
+  propagatedBuildInputs = [
+    bcrypt
+    cryptography
+    gssapi
+    libnacl
+    libsodium
+    nettle
+    pyopenssl
+  ];
+
+  checkInputs = [
+    openssh
+    openssl
+  ];
+
+  # Disables windows specific test (specifically the GSSAPI wrapper for Windows)
+  postPatch = ''
+    rm tests/sspi_stub.py
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework";
+    homepage = https://asyncssh.readthedocs.io/en/latest;
+    license = licenses.epl20;
+    maintainers = with maintainers; [ worldofpeace ];
+  };
+}