uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
58
pkgs/development/python-modules/pytest-xdist/default.nix
Normal file
58
pkgs/development/python-modules/pytest-xdist/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, setuptools-scm
|
||||
, pytestCheckHook
|
||||
, filelock
|
||||
, execnet
|
||||
, pytest
|
||||
, pytest-forked
|
||||
, psutil
|
||||
, pexpect
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytest-xdist";
|
||||
version = "2.5.0";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-RYDeyj/wTdsqxT66Oddstd1e3qwFDLb7x2iw3XErTt8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
buildInputs = [
|
||||
pytest
|
||||
];
|
||||
checkInputs = [ pytestCheckHook filelock pexpect ];
|
||||
propagatedBuildInputs = [ execnet pytest-forked psutil ];
|
||||
|
||||
pytestFlagsArray = [
|
||||
# pytest can already use xdist at this point
|
||||
"--numprocesses=$NIX_BUILD_CORES"
|
||||
"--forked"
|
||||
];
|
||||
|
||||
# access file system
|
||||
disabledTests = [
|
||||
"test_distribution_rsyncdirs_example"
|
||||
"test_rsync_popen_with_path"
|
||||
"test_popen_rsync_subdir"
|
||||
"test_rsync_report"
|
||||
"test_init_rsync_roots"
|
||||
"test_rsyncignore"
|
||||
# flakey
|
||||
"test_internal_errors_propagate_to_controller"
|
||||
];
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pytest xdist plugin for distributed testing and loop-on-failing modes";
|
||||
homepage = "https://github.com/pytest-dev/pytest-xdist";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
18
pkgs/development/python-modules/pytest-xdist/setup-hook.sh
Normal file
18
pkgs/development/python-modules/pytest-xdist/setup-hook.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
pytestXdistHook() {
|
||||
pytestFlagsArray+=(
|
||||
"--numprocesses=$NIX_BUILD_CORES"
|
||||
"--forked"
|
||||
)
|
||||
}
|
||||
|
||||
# the flags should be added before pytestCheckHook runs so
|
||||
# until we have dependency mechanism in generic builder, we need to use this ugly hack.
|
||||
|
||||
if [ -z "${dontUsePytestXdist-}" ] && [ -z "${dontUsePytestCheck-}" ]; then
|
||||
if [[ " ${preDistPhases:-} " =~ " pytestCheckPhase " ]]; then
|
||||
preDistPhases+=" "
|
||||
preDistPhases="${preDistPhases/ pytestCheckPhase / pytestXdistHook pytestCheckPhase }"
|
||||
else
|
||||
preDistPhases+=" pytestXdistHook"
|
||||
fi
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue