diff --git a/pkgs/development/python-modules/snitun/default.nix b/pkgs/development/python-modules/snitun/default.nix index 6926926605b9..1540fcaec9de 100644 --- a/pkgs/development/python-modules/snitun/default.nix +++ b/pkgs/development/python-modules/snitun/default.nix @@ -8,7 +8,6 @@ pytest-aiohttp, pytest-codspeed, pytestCheckHook, - pythonAtLeast, setuptools, }: @@ -24,6 +23,11 @@ buildPythonPackage rec { hash = "sha256-luXv5J0PUvW+AGTecwkEq+qkG1N5Ja5NbBKJ3M6HC0I="; }; + patches = [ + # https://github.com/NabuCasa/snitun/pull/459 + ./fix-python-3.14-compatibility.diff + ]; + postPatch = '' substituteInPlace pyproject.toml \ --replace-fail 'version = "0.0.0"' 'version = "${version}"' diff --git a/pkgs/development/python-modules/snitun/fix-python-3.14-compatibility.diff b/pkgs/development/python-modules/snitun/fix-python-3.14-compatibility.diff new file mode 100644 index 000000000000..b9d849f76f43 --- /dev/null +++ b/pkgs/development/python-modules/snitun/fix-python-3.14-compatibility.diff @@ -0,0 +1,23 @@ +diff --git a/tests/conftest.py b/tests/conftest.py +index 78594e7..1b9c184 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -5,9 +5,11 @@ + from dataclasses import dataclass, field + from datetime import UTC, datetime, timedelta + import logging ++import multiprocessing + import os + import select + import socket ++import sys + from threading import Thread + from unittest.mock import patch + +@@ -338,3 +340,6 @@ async def test_client_peer(peer_listener: PeerListener) -> AsyncGenerator[Client + yield Client(reader, writer) + + writer.close() ++ ++if sys.platform == "linux": ++ multiprocessing.set_start_method("fork", force=True)