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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,71 @@
{ lib
, buildPythonPackage
, fastapi
, fetchFromGitHub
, limits
, mock
, hiro
, poetry-core
, pytestCheckHook
, pythonAtLeast
, pythonOlder
, redis
, starlette
}:
buildPythonPackage rec {
pname = "slowapi";
version = "0.1.5";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "laurentS";
repo = pname;
rev = "v${version}";
sha256 = "1wjnlhjfgil86h6i5yij723ncg18rqdprs1q6i68w4msaspwpxg9";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
limits
redis
];
checkInputs = [
fastapi
hiro
mock
pytestCheckHook
starlette
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'limits = "^1.5"' 'limits = "*"' \
--replace 'redis = "^3.4.1"' 'redis = "*"'
'';
disabledTests = [
# AssertionError: Regex pattern 'parameter `request` must be an instance of starlette.requests.Request' does not match 'This portal is not running'.
"test_endpoint_request_param_invalid"
"test_endpoint_response_param_invalid"
] ++ lib.optionals (pythonAtLeast "3.10") [
"test_multiple_decorators"
];
pythonImportsCheck = [
"slowapi"
];
meta = with lib; {
description = "Python library for API rate limiting";
homepage = "https://github.com/laurentS/slowapi";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}