at 23.05-pre 1.9 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, installShellFiles 6, pandoc 7, pythonOlder 8# BuildInputs 9, charset-normalizer 10, defusedxml 11, multidict 12, pygments 13, requests 14, requests-toolbelt 15, setuptools 16, rich 17, pysocks 18# CheckInputs 19, pytest-httpbin 20, pytest-lazy-fixture 21, pytest-mock 22, pytestCheckHook 23, responses 24, werkzeug 25}: 26 27buildPythonPackage rec { 28 pname = "httpie"; 29 version = "3.2.1"; 30 format = "setuptools"; 31 32 src = fetchFromGitHub { 33 owner = "httpie"; 34 repo = "httpie"; 35 rev = version; 36 hash = "sha256-WEe8zSlNckl7bPBi6u8mHQ1/xPw3kE81F8Xr15TchgM="; 37 }; 38 39 nativeBuildInputs = [ 40 installShellFiles 41 pandoc 42 ]; 43 44 propagatedBuildInputs = [ 45 charset-normalizer 46 defusedxml 47 multidict 48 pygments 49 requests 50 requests-toolbelt 51 setuptools 52 rich 53 pysocks 54 ]; 55 56 checkInputs = [ 57 pytest-httpbin 58 pytest-lazy-fixture 59 pytest-mock 60 pytestCheckHook 61 responses 62 werkzeug 63 ]; 64 65 postInstall = '' 66 # install completions 67 installShellCompletion --bash \ 68 --name http.bash extras/httpie-completion.bash 69 installShellCompletion --fish \ 70 --name http.fish extras/httpie-completion.fish 71 72 # convert the docs/README.md file 73 pandoc --standalone -f markdown -t man docs/README.md -o docs/http.1 74 installManPage docs/http.1 75 ''; 76 77 pytestFlagsArray = [ 78 "httpie" 79 "tests" 80 ]; 81 82 pythonImportsCheck = [ 83 "httpie" 84 ]; 85 86 disabledTestPaths = lib.optionals stdenv.isDarwin [ 87 # flaky 88 "tests/test_plugins_cli.py" 89 ]; 90 91 disabledTests = [ 92 # flaky 93 "test_stdin_read_warning" 94 ] ++ lib.optionals stdenv.isDarwin [ 95 # flaky 96 "test_daemon_runner" 97 ]; 98 99 meta = with lib; { 100 description = "A command line HTTP client whose goal is to make CLI human-friendly"; 101 homepage = "https://httpie.org/"; 102 license = licenses.bsd3; 103 maintainers = with maintainers; [ antono relrod schneefux SuperSandro2000 ]; 104 }; 105}