nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule (finalAttrs: {
8 pname = "zoraxy";
9 version = "3.2.5r2";
10
11 src = fetchFromGitHub {
12 owner = "tobychui";
13 repo = "zoraxy";
14 tag = "v${finalAttrs.version}";
15 hash = "sha256-O7Rzx62O0h3kK6+lMag+5totijJoobOKi8DNWT9sDjg=";
16 };
17
18 sourceRoot = "${finalAttrs.src.name}/src";
19
20 vendorHash = "sha256-Bl3FI8lodSV5kzHvM8GHbQsep0W8s2BG8IbGf2AahZc=";
21
22 checkFlags =
23 let
24 # Skip tests that require network access
25 skippedTests = [
26 "TestExtractIssuerNameFromPEM"
27 "TestReplaceLocationHost"
28 "TestReplaceLocationHostRelative"
29 "TestHandleTraceRoute"
30 "TestHandlePing"
31 "TestListTable"
32 "TestWriteAndRead"
33 "TestHTTP1p1KeepAlive"
34 "TestGetPluginListFromURL"
35 "TestUpdateDownloadablePluginList"
36 ];
37 in
38 [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
39
40 meta = {
41 description = "General purpose HTTP reverse proxy and forwarding tool written in Go";
42 homepage = "https://zoraxy.arozos.com/";
43 changelog = "https://github.com/tobychui/zoraxy/blob/v${finalAttrs.version}/CHANGELOG.md";
44 license = lib.licenses.agpl3Only;
45 maintainers = [ lib.maintainers.luftmensch-luftmensch ];
46 mainProgram = "zoraxy";
47 platforms = lib.platforms.linux;
48 };
49})