2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
pythonAtLeast,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch2,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
wheel,
|
|
|
|
py,
|
|
|
|
pytest,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-forked";
|
2023-02-22 10:55:15 +00:00
|
|
|
version = "1.6.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytest-dev";
|
|
|
|
repo = "pytest-forked";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-owkGwF5WQ17/CXwTsIYJ2AgktekRB4qhtsDxR0LCI/k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch2 {
|
|
|
|
# https://github.com/pytest-dev/pytest-forked/actions
|
|
|
|
name = "pytest8-compat.patch";
|
|
|
|
url = "https://github.com/pytest-dev/pytest-forked/commit/b2742322d39ebda97d5170922520f3bb9c73f614.patch";
|
|
|
|
hash = "sha256-tTRW0p3tOotQMtjjJ6RUKdynsAnKRz0RAV8gAUHiNNA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
wheel
|
2023-01-20 10:41:00 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ pytest ];
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ py ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
py
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
2024-09-26 11:04:55 +00:00
|
|
|
if (pythonAtLeast "3.12" && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then
|
2024-06-05 15:53:02 +00:00
|
|
|
[
|
|
|
|
# non reproducible test failure on hydra, works on community builder
|
|
|
|
# https://hydra.nixos.org/build/252537267
|
|
|
|
"test_xfail"
|
|
|
|
]
|
|
|
|
else
|
|
|
|
null;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
setupHook = ./setup-hook.sh;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/pytest-dev/pytest-forked/blob/${src.rev}/CHANGELOG.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Run tests in isolated forked subprocesses";
|
|
|
|
homepage = "https://github.com/pytest-dev/pytest-forked";
|
|
|
|
license = lib.licenses.mit;
|
2021-02-19 19:06:45 +00:00
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|