@@ -0,0 +1,36 @@
1+{ lib, buildGoModule, fetchFromGitHub }:
2+
3+buildGoModule rec {
4+ pname = "reproxy";
5+ version = "0.5.1";
6+
7+ src = fetchFromGitHub {
8+ owner = "umputun";
9+ repo = pname;
10+ rev = "v${version}";
11+ hash = "sha256-RB3+IU6halnk/2REh2CLDpQN7djn4Y1QuL8y8xppnQw=";
12+ };
13+
14+ postPatch = ''
15+ # Requires network access
16+ substituteInPlace app/main_test.go \
17+ --replace "Test_Main" "Skip_Main"
18+ '';
19+
20+ vendorSha256 = null;
21+
22+ buildFlagsArray = [
23+ "-ldflags=-s -w -X main.revision=${version}"
24+ ];
25+
26+ installPhase = ''
27+ install -Dm755 $GOPATH/bin/app $out/bin/reproxy
28+ '';
29+
30+ meta = with lib; {
31+ description = "Simple edge server / reverse proxy";
32+ homepage = "https://reproxy.io/";
33+ license = licenses.mit;
34+ maintainers = with maintainers; [ sikmir ];
35+ };
36+}