2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2023-01-20 10:41:00 +00:00
|
|
|
, fetchpatch
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2021-02-19 19:06:45 +00:00
|
|
|
, py
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest
|
2021-02-19 19:06:45 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-forked";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "1.4.0";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-13 20:06:32 +00:00
|
|
|
sha256 = "sha256-i2dYfI+Yy7rf3YBFOe1UVbbtA4AiA0hd0vU8FCLXRA4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
patches = [
|
|
|
|
# pytest 7.2.0 compat, remove after 1.4.0
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pytest-dev/pytest-forked/commit/c3c753e96916a4bc5a8a37699e75c6cbbd653fa2.patch";
|
|
|
|
hash = "sha256-QPgxBeMQ0eKJyHXYZyBicVbE+JyKPV/Kbjsb8gNJBGA=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pytest-dev/pytest-forked/commit/de584eda15df6db7912ab6197cfb9ff23024ef23.patch";
|
|
|
|
hash = "sha256-VLE32xZRwFK0nEgCWuSoMW/yyFHEURtNFU9Aa9haLhk=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
buildInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
py
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
checkInputs = [
|
|
|
|
py
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|