2021-09-27 11:40:29 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, python3Packages
|
|
|
|
, pandoc
|
|
|
|
}:
|
2012-12-28 22:28:34 +00:00
|
|
|
|
2019-09-20 09:04:18 +01:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2019-08-30 04:02:24 +01:00
|
|
|
pname = "httpie";
|
2021-09-27 11:40:29 +01:00
|
|
|
version = "2.5.0";
|
2012-12-28 22:28:34 +00:00
|
|
|
|
2019-09-23 15:56:01 +01:00
|
|
|
src = fetchFromGitHub {
|
2021-02-08 10:34:19 +00:00
|
|
|
owner = "httpie";
|
2019-09-23 15:56:01 +01:00
|
|
|
repo = "httpie";
|
|
|
|
rev = version;
|
2021-09-27 11:40:29 +01:00
|
|
|
sha256 = "sha256-GwwZLXf9CH024gKfWsYPnr/oqQcxR/lQIToFRh59B+E=";
|
2012-12-28 22:28:34 +00:00
|
|
|
};
|
|
|
|
|
2021-09-27 11:40:29 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
pandoc
|
2020-06-22 10:26:36 +01:00
|
|
|
];
|
2019-09-23 15:56:01 +01:00
|
|
|
|
2021-09-27 11:40:29 +01:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
defusedxml
|
|
|
|
pygments
|
|
|
|
requests
|
|
|
|
requests-toolbelt
|
|
|
|
setuptools
|
|
|
|
];
|
2021-02-08 10:34:19 +00:00
|
|
|
|
2019-09-23 15:56:01 +01:00
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
mock
|
|
|
|
pytest
|
|
|
|
pytest-httpbin
|
|
|
|
pytestCheckHook
|
2021-09-27 11:40:29 +01:00
|
|
|
responses
|
2019-09-23 15:56:01 +01:00
|
|
|
];
|
|
|
|
|
2020-03-01 23:44:35 +00:00
|
|
|
postInstall = ''
|
2020-03-02 00:16:54 +00:00
|
|
|
# install completions
|
2021-09-27 11:40:29 +01: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-03-01 23:44:35 +00:00
|
|
|
'';
|
|
|
|
|
2021-09-27 11:40:29 +01:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"httpie"
|
|
|
|
"tests"
|
|
|
|
];
|
2012-12-28 22:28:34 +00:00
|
|
|
|
2021-09-27 11:40:29 +01:00
|
|
|
disabledTests = [
|
|
|
|
"test_chunked"
|
|
|
|
"test_verbose_chunked"
|
|
|
|
"test_multipart_chunked"
|
|
|
|
"test_request_body_from_file_by_path_chunked"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "httpie" ];
|
2021-02-08 10:34:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2012-12-28 23:09:01 +00:00
|
|
|
description = "A command line HTTP client whose goal is to make CLI human-friendly";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://httpie.org/";
|
2021-02-08 10:34:19 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ antono relrod schneefux SuperSandro2000 ];
|
2012-12-28 22:28:34 +00:00
|
|
|
};
|
|
|
|
}
|