2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2022-01-09 09:58:31 +00:00
|
|
|
, brotlipy
|
2017-04-27 06:24:07 +00:00
|
|
|
, buildPythonPackage
|
2022-01-09 09:58:31 +00:00
|
|
|
, decorator
|
2022-04-03 21:15:12 +00:00
|
|
|
, fetchpatch
|
2017-04-27 06:24:07 +00:00
|
|
|
, fetchPypi
|
|
|
|
, flask
|
2018-01-20 10:52:36 +00:00
|
|
|
, flask-limiter
|
2017-04-27 06:24:07 +00:00
|
|
|
, itsdangerous
|
2022-01-09 09:58:31 +00:00
|
|
|
, markupsafe
|
2018-01-20 10:52:36 +00:00
|
|
|
, raven
|
2017-10-25 18:04:35 +00:00
|
|
|
, six
|
2022-01-09 09:58:31 +00:00
|
|
|
, pytestCheckHook
|
2022-05-30 03:00:14 +00:00
|
|
|
, werkzeug
|
2017-10-25 18:04:35 +00:00
|
|
|
}:
|
2017-04-27 06:24:07 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "httpbin";
|
2020-06-16 23:15:29 +00:00
|
|
|
version = "0.7.0";
|
2022-01-09 09:58:31 +00:00
|
|
|
format = "setuptools";
|
2017-04-27 06:24:07 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-09 09:58:31 +00:00
|
|
|
hash = "sha256-y7N3kMkVdfTxV1f0KtQdn3KesifV7b6J5OwXVIbbjfo=";
|
2017-04-27 06:24:07 +00:00
|
|
|
};
|
|
|
|
|
2022-04-03 21:15:12 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# Replaces BaseResponse class with Response class for Werkezug 2.1.0 compatibility
|
|
|
|
# https://github.com/postmanlabs/httpbin/pull/674
|
|
|
|
url = "https://github.com/postmanlabs/httpbin/commit/5cc81ce87a3c447a127e4a1a707faf9f3b1c9b6b.patch";
|
|
|
|
hash = "sha256-SbEWjiqayMFYrbgAPZtSsXqSyCDUz3z127XgcKOcrkE=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-01-09 09:58:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
brotlipy
|
2022-05-30 03:00:14 +00:00
|
|
|
decorator
|
2022-01-09 09:58:31 +00:00
|
|
|
flask
|
|
|
|
flask-limiter
|
|
|
|
itsdangerous
|
2022-05-30 03:00:14 +00:00
|
|
|
markupsafe
|
2022-01-09 09:58:31 +00:00
|
|
|
raven
|
|
|
|
six
|
2022-05-30 03:00:14 +00:00
|
|
|
werkzeug
|
|
|
|
] ++ raven.optional-dependencies.flask;
|
2022-01-09 09:58:31 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-09 09:58:31 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"test_httpbin.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests seems to be outdated
|
|
|
|
"test_anything"
|
|
|
|
"test_get"
|
|
|
|
"test_redirect_n_equals_to_1"
|
|
|
|
"test_redirect_n_higher_than_1"
|
|
|
|
"test_redirect_to_post"
|
|
|
|
"test_relative_redirect_n_equals_to_1"
|
|
|
|
"test_relative_redirect_n_higher_than_1"
|
|
|
|
];
|
2017-04-27 06:24:07 +00:00
|
|
|
|
2022-01-09 09:58:31 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"httpbin"
|
|
|
|
];
|
2017-10-25 18:04:35 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-01-09 09:58:31 +00:00
|
|
|
description = "HTTP Request and Response Service";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/kennethreitz/httpbin";
|
2017-04-27 06:24:07 +00:00
|
|
|
license = licenses.mit;
|
2022-01-09 09:58:31 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-04-27 06:24:07 +00:00
|
|
|
};
|
|
|
|
}
|