Loading pkgs/development/python-modules/mirakuru/default.nix +23 −3 Original line number Diff line number Diff line { stdenv, lib, buildPythonPackage, fetchFromGitHub, Loading @@ -13,18 +14,23 @@ buildPythonPackage rec { pname = "mirakuru"; version = "2.5.2"; version = "2.5.3"; format = "pyproject"; disabled = pythonOlder "3.8"; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "ClearcodeHQ"; repo = "mirakuru"; rev = "refs/tags/v${version}"; hash = "sha256-I1TKP0ESuBMTcReZf0tryjvGpSpwzofwmOiQqhyr6Zg="; hash = "sha256-blk4Oclb3+Cj3RH7BhzacfoPFDBIP/zgv4Ct7fawGnQ="; }; patches = [ # https://github.com/ClearcodeHQ/mirakuru/pull/810 ./tmpdir.patch ]; nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ psutil ]; Loading @@ -37,6 +43,20 @@ buildPythonPackage rec { ]; pythonImportsCheck = [ "mirakuru" ]; # Necessary for the tests to pass on Darwin with sandbox enabled. __darwinAllowLocalNetworking = true; # Those are failing in the darwin sandbox with: # > ps: %mem: requires entitlement # > ps: vsz: requires entitlement # > ps: rss: requires entitlement # > ps: time: requires entitlement disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_forgotten_stop" "test_mirakuru_cleanup" "test_daemons_killing" ]; meta = with lib; { homepage = "https://pypi.org/project/mirakuru"; description = "Process orchestration tool designed for functional and integration tests"; 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}" pkgs/development/python-modules/pgsanity/default.nix +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ buildPythonPackage rec { unittestCheckHook postgresql ]; unittestFlagsArray = [ "test" ]; propagatedBuildInputs = [ postgresql ]; meta = with lib; { Loading Loading
pkgs/development/python-modules/mirakuru/default.nix +23 −3 Original line number Diff line number Diff line { stdenv, lib, buildPythonPackage, fetchFromGitHub, Loading @@ -13,18 +14,23 @@ buildPythonPackage rec { pname = "mirakuru"; version = "2.5.2"; version = "2.5.3"; format = "pyproject"; disabled = pythonOlder "3.8"; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "ClearcodeHQ"; repo = "mirakuru"; rev = "refs/tags/v${version}"; hash = "sha256-I1TKP0ESuBMTcReZf0tryjvGpSpwzofwmOiQqhyr6Zg="; hash = "sha256-blk4Oclb3+Cj3RH7BhzacfoPFDBIP/zgv4Ct7fawGnQ="; }; patches = [ # https://github.com/ClearcodeHQ/mirakuru/pull/810 ./tmpdir.patch ]; nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ psutil ]; Loading @@ -37,6 +43,20 @@ buildPythonPackage rec { ]; pythonImportsCheck = [ "mirakuru" ]; # Necessary for the tests to pass on Darwin with sandbox enabled. __darwinAllowLocalNetworking = true; # Those are failing in the darwin sandbox with: # > ps: %mem: requires entitlement # > ps: vsz: requires entitlement # > ps: rss: requires entitlement # > ps: time: requires entitlement disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_forgotten_stop" "test_mirakuru_cleanup" "test_daemons_killing" ]; meta = with lib; { homepage = "https://pypi.org/project/mirakuru"; description = "Process orchestration tool designed for functional and integration tests"; 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}"
pkgs/development/python-modules/pgsanity/default.nix +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ buildPythonPackage rec { unittestCheckHook postgresql ]; unittestFlagsArray = [ "test" ]; propagatedBuildInputs = [ postgresql ]; meta = with lib; { Loading