From 78e3a0877691fac433ce626641597f14de0d06af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 14 Jul 2026 09:16:00 -0700 Subject: [PATCH] python3Packages.paho-mqtt: regenerate certificates for tests The certificate tests/ssl/server.crt expired on July 6, 2026, leading to ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_EXPIRED] ssl/tls alert certificate expired (_ssl.c:1032) in the tests. --- pkgs/development/python-modules/paho-mqtt/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/paho-mqtt/default.nix b/pkgs/development/python-modules/paho-mqtt/default.nix index ac25b8275f16..b0ea0015bb42 100644 --- a/pkgs/development/python-modules/paho-mqtt/default.nix +++ b/pkgs/development/python-modules/paho-mqtt/default.nix @@ -4,6 +4,7 @@ buildPythonPackage, fetchFromGitHub, hatchling, + openssl, pytestCheckHook, }: @@ -27,11 +28,17 @@ buildPythonPackage rec { hash = "sha256-VMq+WTW+njK34QUUTE6fR2j2OmHxVzR0wrC92zYb1rY="; }; + postPatch = '' + substituteInPlace tests/ssl/gen.sh \ + --replace-fail "c_rehash certs" "#c_rehash certs" + ''; + build-system = [ hatchling ]; nativeCheckInputs = [ + openssl pytestCheckHook ]; @@ -44,6 +51,10 @@ buildPythonPackage rec { # paho.mqtt not in top-level dir to get caught by this export PYTHONPATH=".:$PYTHONPATH" + + pushd tests/ssl + HOME="$(mktemp -d)" ./gen.sh + popd ''; disabledTests = [