python3Packages.paho-mqtt: use upstream patch for generating SSL certs

(cherry picked from commit 72f5048d56)
This commit is contained in:
Robert Schütz
2026-07-16 10:21:21 -07:00
committed by github-actions[bot]
parent 49e1860f90
commit bf5919b4d3

View File

@@ -3,9 +3,11 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
hatchling,
openssl,
pytestCheckHook,
writableTmpDirAsHomeHook,
}:
let
@@ -28,10 +30,13 @@ buildPythonPackage rec {
hash = "sha256-VMq+WTW+njK34QUUTE6fR2j2OmHxVzR0wrC92zYb1rY=";
};
postPatch = ''
substituteInPlace tests/ssl/gen.sh \
--replace-fail "c_rehash certs" "#c_rehash certs"
'';
patches = [
(fetchpatch {
name = "generate-ssl-certs-in-a-test-fixture.patch";
url = "https://github.com/eclipse-paho/paho.mqtt.python/pull/931.diff";
hash = "sha256-A7rWwpR4PnCi77F1VqsQKHBxHNrdeHgmVM6BGMeUpjs=";
})
];
build-system = [
hatchling
@@ -40,6 +45,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
openssl
pytestCheckHook
writableTmpDirAsHomeHook
];
__darwinAllowLocalNetworking = true;
@@ -51,10 +57,6 @@ 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 = [