2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-02-29 20:09:43 +00:00
|
|
|
, fetchpatch
|
2024-01-13 08:15:51 +00:00
|
|
|
, pythonRelaxDepsHook
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, brotlicffi
|
|
|
|
, decorator
|
2023-11-16 04:20:00 +00:00
|
|
|
, flasgger
|
2024-01-13 08:15:51 +00:00
|
|
|
, flask
|
|
|
|
, greenlet
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
2022-06-26 10:26:21 +00:00
|
|
|
, werkzeug
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
, gunicorn
|
|
|
|
, gevent
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "httpbin";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.10.1";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-e4WWvrDnWntlPDnR888mPW1cR20p4d9ve7K3C/nwaj0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# backport flask 3.0 support; drop after 0.10.1
|
|
|
|
url = "https://github.com/psf/httpbin/commit/c1d9e33049263fed3cb27806a97f094acc350905.patch";
|
|
|
|
hash = "sha256-SYJgQN3ERDgLIaBc4eqDfey+EX4z6CSxLoAA7j+16xI=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2024-01-13 08:15:51 +00:00
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"greenlet"
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
brotlicffi
|
2022-06-26 10:26:21 +00:00
|
|
|
decorator
|
2022-02-10 20:34:41 +00:00
|
|
|
flask
|
2023-11-16 04:20:00 +00:00
|
|
|
flasgger
|
2024-01-13 08:15:51 +00:00
|
|
|
greenlet
|
2022-02-10 20:34:41 +00:00
|
|
|
six
|
2022-06-26 10:26:21 +00:00
|
|
|
werkzeug
|
2024-01-13 08:15:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
mainapp = [
|
|
|
|
gunicorn
|
|
|
|
gevent
|
|
|
|
];
|
|
|
|
};
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
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"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"httpbin"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-02-10 20:34:41 +00:00
|
|
|
description = "HTTP Request and Response Service";
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://github.com/psf/httpbin";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|