2021-10-01 09:20:50 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, python3Packages
|
|
|
|
, pandoc
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "httpie";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "3.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-02-13 14:23:35 +00:00
|
|
|
owner = "httpie";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "httpie";
|
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-s3IFzEUQmPBocgspVGx1nINkUamsi7tzwW37IqdBMxo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
pandoc
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2021-10-17 09:34:42 +00:00
|
|
|
charset-normalizer
|
2021-10-01 09:20:50 +00:00
|
|
|
defusedxml
|
2022-02-10 20:34:41 +00:00
|
|
|
multidict
|
2021-10-01 09:20:50 +00:00
|
|
|
pygments
|
|
|
|
requests
|
|
|
|
requests-toolbelt
|
|
|
|
setuptools
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
mock
|
|
|
|
pytest
|
|
|
|
pytest-httpbin
|
|
|
|
pytestCheckHook
|
2021-10-01 09:20:50 +00:00
|
|
|
responses
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# install completions
|
2021-10-01 09:20:50 +00:00
|
|
|
installShellCompletion --bash \
|
|
|
|
--name http.bash extras/httpie-completion.bash
|
|
|
|
installShellCompletion --fish \
|
|
|
|
--name http.fish extras/httpie-completion.fish
|
|
|
|
|
|
|
|
# convert the docs/README.md file
|
|
|
|
pandoc --standalone -f markdown -t man docs/README.md -o docs/http.1
|
|
|
|
installManPage docs/http.1
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"httpie"
|
|
|
|
"tests"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_chunked"
|
|
|
|
"test_verbose_chunked"
|
|
|
|
"test_multipart_chunked"
|
|
|
|
"test_request_body_from_file_by_path_chunked"
|
2021-10-17 09:34:42 +00:00
|
|
|
# Part of doctest
|
|
|
|
"httpie.encoding.detect_encoding"
|
2021-10-01 09:20:50 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "httpie" ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A command line HTTP client whose goal is to make CLI human-friendly";
|
|
|
|
homepage = "https://httpie.org/";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ antono relrod schneefux SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|