From 85eeceaed2a6195698a34018297cd3de74731baf Mon Sep 17 00:00:00 2001 From: Mag1cByt3s Date: Mon, 26 Jan 2026 04:47:56 +0100 Subject: [PATCH 1/2] impacket: enable OpenSSL legacy provider in wrappers --- .../python-modules/impacket/default.nix | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/impacket/default.nix b/pkgs/development/python-modules/impacket/default.nix index e7282ace1c1e..3c89567959c7 100644 --- a/pkgs/development/python-modules/impacket/default.nix +++ b/pkgs/development/python-modules/impacket/default.nix @@ -11,11 +11,31 @@ pyasn1-modules, pycryptodomex, pyopenssl, + python, setuptools, pytestCheckHook, six, + writeText, }: +let + opensslConf = writeText "openssl.conf" '' + openssl_conf = openssl_init + + [openssl_init] + providers = provider_sect + + [provider_sect] + default = default_sect + legacy = legacy_sect + + [default_sect] + activate = 1 + + [legacy_sect] + activate = 1 + ''; +in buildPythonPackage rec { pname = "impacket"; version = "0.13.0"; @@ -46,7 +66,12 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "impacket" ]; + makeWrapperArgs = [ "--set-default OPENSSL_CONF ${opensslConf}" ]; + + pythonImportsCheck = [ + "impacket" + "impacket.msada_guids" + ]; disabledTestPaths = [ # Skip all RPC related tests From a3fd0f5c5aad4dfa9b497edf96f1f462033283d2 Mon Sep 17 00:00:00 2001 From: Mag1cByt3s Date: Mon, 26 Jan 2026 05:10:44 +0100 Subject: [PATCH 2/2] impacket: drop unneeded python input --- pkgs/development/python-modules/impacket/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/python-modules/impacket/default.nix b/pkgs/development/python-modules/impacket/default.nix index 3c89567959c7..4aca3c0794f0 100644 --- a/pkgs/development/python-modules/impacket/default.nix +++ b/pkgs/development/python-modules/impacket/default.nix @@ -11,7 +11,6 @@ pyasn1-modules, pycryptodomex, pyopenssl, - python, setuptools, pytestCheckHook, six,