1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 versionCheckHook,
6}:
7
8buildGoModule rec {
9 pname = "httpx";
10 version = "1.7.1";
11
12 src = fetchFromGitHub {
13 owner = "projectdiscovery";
14 repo = "httpx";
15 tag = "v${version}";
16 hash = "sha256-PJN7Pmor2pZauW70QDAs4U8Q5kjBrjfyWqEgkUNK+MQ=";
17 };
18
19 vendorHash = "sha256-loxc8ddnape3d0TVvmAw76oqKJOJ6uFKNnPkPbEXEJ8=";
20
21 subPackages = [ "cmd/httpx" ];
22
23 nativeInstallCheckInputs = [ versionCheckHook ];
24
25 ldflags = [
26 "-s"
27 "-w"
28 ];
29
30 # Tests require network access
31 doCheck = false;
32
33 doInstallCheck = true;
34
35 versionCheckProgramArg = "-version";
36
37 meta = {
38 description = "Fast and multi-purpose HTTP toolkit";
39 longDescription = ''
40 httpx is a fast and multi-purpose HTTP toolkit allow to run multiple
41 probers using retryablehttp library, it is designed to maintain the
42 result reliability with increased threads.
43 '';
44 homepage = "https://github.com/projectdiscovery/httpx";
45 changelog = "https://github.com/projectdiscovery/httpx/releases/tag/v${version}";
46 license = lib.licenses.mit;
47 maintainers = with lib.maintainers; [ fab ];
48 mainProgram = "httpx";
49 };
50}