From f620e43a08b7a7cdbc09c43358007b58b156a39e Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Tue, 17 Jun 2025 15:28:31 +0000 Subject: [PATCH] python3Packages.pure-sasl: init at 0.6.2 Co-authored-by: Aleksana --- .../python-modules/pure-sasl/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/pure-sasl/default.nix diff --git a/pkgs/development/python-modules/pure-sasl/default.nix b/pkgs/development/python-modules/pure-sasl/default.nix new file mode 100644 index 000000000000..5b22becc77da --- /dev/null +++ b/pkgs/development/python-modules/pure-sasl/default.nix @@ -0,0 +1,41 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pykerberos, + pytestCheckHook, + six, +}: + +buildPythonPackage rec { + pname = "pure-sasl"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "thobbs"; + repo = "pure-sasl"; + tag = version; + hash = "sha256-AHoZ3QZLr0JLE8+a2zkB06v2wRknxhgm/tcEPXaJX/U="; + }; + + postPatch = '' + substituteInPlace tests/unit/test_mechanism.py \ + --replace 'from mock import patch' 'from unittest.mock import patch' + ''; + + pythonImportsCheck = [ "puresasl" ]; + + nativeCheckInputs = [ + pykerberos + pytestCheckHook + six + ]; + + meta = { + description = "Reasonably high-level SASL client written in pure Python"; + homepage = "http://github.com/thobbs/pure-sasl"; + changelog = "https://github.com/thobbs/pure-sasl/blob/0.6.2/CHANGES.rst"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ jherland ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8e2bc6a2c695..bde7230195af 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11963,6 +11963,8 @@ self: super: with self; { callPackage ../development/python-modules/pure-python-adb-homeassistant { }; + pure-sasl = callPackage ../development/python-modules/pure-sasl { }; + puremagic = callPackage ../development/python-modules/puremagic { }; purepng = callPackage ../development/python-modules/purepng { };