My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/tools/networking/httpie/default.nix

74 lines
1.4 KiB

{ lib
, fetchFromGitHub
, installShellFiles
, python3
, pandoc
}:
python3.pkgs.buildPythonApplication rec {
pname = "httpie";
version = "3.2.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "httpie";
repo = "httpie";
rev = version;
hash = "sha256-WEe8zSlNckl7bPBi6u8mHQ1/xPw3kE81F8Xr15TchgM=";
};
nativeBuildInputs = [
installShellFiles
pandoc
];
propagatedBuildInputs = with python3.pkgs; [
charset-normalizer
defusedxml
multidict
pygments
requests
requests-toolbelt
setuptools
rich
pysocks
];
checkInputs = with python3.pkgs; [
pytest
pytest-httpbin
pytest-lazy-fixture
pytest-mock
pytestCheckHook
responses
werkzeug
];
postInstall = ''
# install completions
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
'';
pytestFlagsArray = [
"httpie"
"tests"
];
pythonImportsCheck = [
"httpie"
];
meta = with lib; {
description = "A command line HTTP client whose goal is to make CLI human-friendly";
homepage = "https://httpie.org/";
license = licenses.bsd3;
maintainers = with maintainers; [ antono relrod schneefux SuperSandro2000 ];
};
}