nixpkgs/pkgs/development/python-modules/python3-gnutls/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

68 lines
2 KiB
Nix

{
lib,
fetchFromGitHub,
replaceVars,
buildPythonPackage,
isPy3k,
gnutls,
twisted,
pyopenssl,
service-identity,
setuptools,
}:
buildPythonPackage rec {
pname = "python3-gnutls";
version = "3.1.10";
pyproject = true;
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "AGProjects";
repo = "python3-gnutls";
tag = "release-${version}";
hash = "sha256-AdFRF3ZlkkAoSm5rvf/09FSYIo7SsZ38sD2joOLyukA=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
twisted
pyopenssl
service-identity
];
patches = [
(replaceVars ./libgnutls-path.patch {
gnutlslib = "${lib.getLib gnutls}/lib";
})
];
pythonImportsCheck = [ "gnutls" ];
meta = {
description = "Python wrapper for the GnuTLS library";
homepage = "https://github.com/AGProjects/python3-gnutls";
license = lib.licenses.lgpl21Plus;
maintainers = with lib.maintainers; [ chanley ];
longDescription = ''
This package provides a high level object oriented wrapper around libgnutls,
as well as low level bindings to the GnuTLS types and functions via ctypes.
The high level wrapper hides the details of accessing the GnuTLS library via
ctypes behind a set of classes that encapsulate GnuTLS sessions, certificates
and credentials and expose them to python applications using a simple API.
The package also includes a Twisted interface that has seamless intergration
with Twisted, providing connectTLS and listenTLS methods on the Twisted
reactor once imported (the methods are automatically attached to the reactor
by simply importing the GnuTLS Twisted interface module).
The high level wrapper is written using the GnuTLS library bindings that are
made available via ctypes. This makes the wrapper very powerful and flexible
as it has direct access to all the GnuTLS internals and is also very easy to
extend without any need to write C code or recompile anything.
'';
};
}