1 { lib, fetchFromGitHub, substituteAll, buildPythonPackage, isPy3k, gnutls
2 , twisted, pyopenssl, service-identity }:
4 buildPythonPackage rec {
5 pname = "python3-gnutls";
10 src = fetchFromGitHub {
12 repo = "python3-gnutls";
13 rev = "324b78f7cd3d9fe58c89c7f0b2bf94199bd6a6e5"; # version not tagged
14 hash = "sha256-18T8bAHlNERHobsspUFvSC6ulN55nrFFb5aqNwU8T00=";
17 propagatedBuildInputs = [ twisted pyopenssl service-identity ];
21 src = ./libgnutls-path.patch;
22 gnutlslib = "${lib.getLib gnutls}/lib";
26 pythonImportsCheck = [ "gnutls" ];
29 description = "Python wrapper for the GnuTLS library";
30 homepage = "https://github.com/AGProjects/python3-gnutls";
31 license = licenses.lgpl21Plus;
32 maintainers = with maintainers; [ chanley ];
34 This package provides a high level object oriented wrapper around libgnutls,
35 as well as low level bindings to the GnuTLS types and functions via ctypes.
36 The high level wrapper hides the details of accessing the GnuTLS library via
37 ctypes behind a set of classes that encapsulate GnuTLS sessions, certificates
38 and credentials and expose them to python applications using a simple API.
40 The package also includes a Twisted interface that has seamless intergration
41 with Twisted, providing connectTLS and listenTLS methods on the Twisted
42 reactor once imported (the methods are automatically attached to the reactor
43 by simply importing the GnuTLS Twisted interface module).
45 The high level wrapper is written using the GnuTLS library bindings that are
46 made available via ctypes. This makes the wrapper very powerful and flexible
47 as it has direct access to all the GnuTLS internals and is also very easy to
48 extend without any need to write C code or recompile anything.