Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 83 lines 1.8 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 python3, 5 httpie, 6 versionCheckHook, 7}: 8 9let 10 python = python3.override { 11 self = python; 12 packageOverrides = _: super: { 13 prompt-toolkit = super.prompt-toolkit.overridePythonAttrs (old: rec { 14 version = "1.0.18"; 15 src = old.src.override { 16 inherit version; 17 hash = "sha256-3U/KAsgGlJetkxotCZFMaw0bUBUc6Ha8Fb3kx0cJASY="; 18 }; 19 }); 20 }; 21 }; 22in 23python.pkgs.buildPythonApplication rec { 24 pname = "http-prompt"; 25 version = "2.1.0"; 26 pyproject = true; 27 28 src = fetchFromGitHub { 29 tag = "v${version}"; 30 repo = "http-prompt"; 31 owner = "httpie"; 32 hash = "sha256-e4GyuxCeXYNsnBXyjIJz1HqSrqTGan0N3wxUFS+Hvkw="; 33 }; 34 35 build-system = [ python.pkgs.setuptools ]; 36 37 dependencies = with python.pkgs; [ 38 click 39 httpie 40 parsimonious 41 prompt-toolkit 42 pygments 43 six 44 pyyaml 45 ]; 46 47 pythonImportsCheck = [ "http_prompt" ]; 48 49 nativeCheckInputs = [ 50 python.pkgs.mock 51 python.pkgs.pexpect 52 python.pkgs.pytest-cov-stub 53 python.pkgs.pytestCheckHook 54 versionCheckHook 55 ]; 56 57 disabledTests = [ 58 # require network access 59 "test_get_and_tee" 60 "test_get_image" 61 "test_get_querystring" 62 "test_post_form" 63 "test_post_json" 64 "test_spec_from_http" 65 "test_spec_from_http_only" 66 # executable path is hardcoded 67 "test_help" 68 "test_interaction" 69 "test_version" 70 "test_vi_mode" 71 ]; 72 73 versionCheckProgramArg = "--version"; 74 75 meta = { 76 description = "Interactive command-line HTTP client featuring autocomplete and syntax highlighting"; 77 mainProgram = "http-prompt"; 78 homepage = "https://github.com/eliangcs/http-prompt"; 79 license = lib.licenses.mit; 80 maintainers = with lib.maintainers; [ matthiasbeyer ]; 81 platforms = lib.platforms.linux ++ lib.platforms.darwin; 82 }; 83}