Loading pkgs/development/python-modules/mirakuru/default.nix +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,11 @@ buildPythonPackage rec { hash = "sha256-blk4Oclb3+Cj3RH7BhzacfoPFDBIP/zgv4Ct7fawGnQ="; }; patches = [ # https://github.com/ClearcodeHQ/mirakuru/pull/810 ./tmpdir.patch ]; nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ psutil ]; Loading pkgs/development/python-modules/mirakuru/tmpdir.patch 0 → 100644 +19 −0 Original line number Diff line number Diff line --- a/tests/executors/test_unixsocket_executor.py +++ b/tests/executors/test_unixsocket_executor.py @@ -4,6 +4,7 @@ Some of these tests run ``nc``: when running Debian, make sure the ``netcat-openbsd`` package is used, not ``netcat-traditional``. """ +import os import sys import pytest @@ -12,7 +13,7 @@ from mirakuru import TimeoutExpired from mirakuru.unixsocket import UnixSocketExecutor from tests import TEST_SOCKET_SERVER_PATH -SOCKET_PATH = "/tmp/mirakuru.sock" +SOCKET_PATH = os.path.join(os.getenv("TMPDIR", "/tmp"), "mirakuru.sock") SOCKET_SERVER_CMD = f"{sys.executable} {TEST_SOCKET_SERVER_PATH} {SOCKET_PATH}" Loading
pkgs/development/python-modules/mirakuru/default.nix +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,11 @@ buildPythonPackage rec { hash = "sha256-blk4Oclb3+Cj3RH7BhzacfoPFDBIP/zgv4Ct7fawGnQ="; }; patches = [ # https://github.com/ClearcodeHQ/mirakuru/pull/810 ./tmpdir.patch ]; nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ psutil ]; Loading
pkgs/development/python-modules/mirakuru/tmpdir.patch 0 → 100644 +19 −0 Original line number Diff line number Diff line --- a/tests/executors/test_unixsocket_executor.py +++ b/tests/executors/test_unixsocket_executor.py @@ -4,6 +4,7 @@ Some of these tests run ``nc``: when running Debian, make sure the ``netcat-openbsd`` package is used, not ``netcat-traditional``. """ +import os import sys import pytest @@ -12,7 +13,7 @@ from mirakuru import TimeoutExpired from mirakuru.unixsocket import UnixSocketExecutor from tests import TEST_SOCKET_SERVER_PATH -SOCKET_PATH = "/tmp/mirakuru.sock" +SOCKET_PATH = os.path.join(os.getenv("TMPDIR", "/tmp"), "mirakuru.sock") SOCKET_SERVER_CMD = f"{sys.executable} {TEST_SOCKET_SERVER_PATH} {SOCKET_PATH}"