Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 121 lines 2.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 charset-normalizer, 6 defusedxml, 7 fetchFromGitHub, 8 installShellFiles, 9 multidict, 10 pandoc, 11 pip, 12 pygments, 13 pytest-httpbin, 14 pytest-lazy-fixture, 15 pytest-mock, 16 pytestCheckHook, 17 requests-toolbelt, 18 requests, 19 responses, 20 rich, 21 setuptools, 22 werkzeug, 23}: 24 25buildPythonPackage rec { 26 pname = "httpie"; 27 version = "3.2.4"; 28 pyproject = true; 29 30 src = fetchFromGitHub { 31 owner = "httpie"; 32 repo = "httpie"; 33 rev = "refs/tags/${version}"; 34 hash = "sha256-uZKkUUrPPnLHPHL8YrZgfsyCsSOR0oZ2eFytiV0PIUY="; 35 }; 36 37 pythonRelaxDeps = [ 38 "defusedxml" 39 "requests" 40 ]; 41 42 build-system = [ setuptools ]; 43 44 nativeBuildInputs = [ 45 installShellFiles 46 pandoc 47 ]; 48 49 dependencies = [ 50 charset-normalizer 51 defusedxml 52 multidict 53 pygments 54 requests 55 requests-toolbelt 56 setuptools 57 rich 58 ] ++ requests.optional-dependencies.socks; 59 60 __darwinAllowLocalNetworking = true; 61 62 nativeCheckInputs = [ 63 pip 64 pytest-httpbin 65 pytest-lazy-fixture 66 pytest-mock 67 pytestCheckHook 68 responses 69 werkzeug 70 ]; 71 72 postInstall = '' 73 # install completions 74 installShellCompletion --cmd http \ 75 --bash extras/httpie-completion.bash \ 76 --fish extras/httpie-completion.fish 77 78 # convert the docs/README.md file 79 pandoc --standalone -f markdown -t man docs/README.md -o docs/http.1 80 installManPage docs/http.1 81 ''; 82 83 pytestFlagsArray = [ 84 "httpie" 85 "tests" 86 ]; 87 88 pythonImportsCheck = [ "httpie" ]; 89 90 disabledTestPaths = [ 91 # Tests are flaky 92 "tests/test_plugins_cli.py" 93 ]; 94 95 disabledTests = 96 [ 97 # Test is flaky 98 "test_stdin_read_warning" 99 # httpbin compatibility issues 100 "test_compress_form" 101 "test_binary_suppresses_when_terminal" 102 "test_binary_suppresses_when_not_terminal_but_pretty" 103 "test_binary_included_and_correct_when_suitable" 104 ] 105 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 106 # Test is flaky 107 "test_daemon_runner" 108 ]; 109 110 meta = with lib; { 111 description = "Command line HTTP client whose goal is to make CLI human-friendly"; 112 homepage = "https://httpie.org/"; 113 changelog = "https://github.com/httpie/httpie/blob/${version}/CHANGELOG.md"; 114 license = licenses.bsd3; 115 maintainers = with maintainers; [ 116 antono 117 relrod 118 schneefux 119 ]; 120 }; 121}