From 536b5f81655e9ee9ce4c10172364192631570a73 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Fri, 14 May 2021 23:57:49 +0300 Subject: [PATCH] reproxy: init at 0.5.1 --- pkgs/servers/reproxy/default.nix | 36 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/servers/reproxy/default.nix diff --git a/pkgs/servers/reproxy/default.nix b/pkgs/servers/reproxy/default.nix new file mode 100644 index 000000000000..29a2f485abd1 --- /dev/null +++ b/pkgs/servers/reproxy/default.nix @@ -0,0 +1,36 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "reproxy"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "umputun"; + repo = pname; + rev = "v${version}"; + hash = "sha256-RB3+IU6halnk/2REh2CLDpQN7djn4Y1QuL8y8xppnQw="; + }; + + postPatch = '' + # Requires network access + substituteInPlace app/main_test.go \ + --replace "Test_Main" "Skip_Main" + ''; + + vendorSha256 = null; + + buildFlagsArray = [ + "-ldflags=-s -w -X main.revision=${version}" + ]; + + installPhase = '' + install -Dm755 $GOPATH/bin/app $out/bin/reproxy + ''; + + meta = with lib; { + description = "Simple edge server / reverse proxy"; + homepage = "https://reproxy.io/"; + license = licenses.mit; + maintainers = with maintainers; [ sikmir ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9ae283aa6b39..00dad5e80335 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19420,6 +19420,8 @@ in redstore = callPackage ../servers/http/redstore { }; + reproxy = callPackage ../servers/reproxy { }; + restic = callPackage ../tools/backup/restic { }; restic-rest-server = callPackage ../tools/backup/restic/rest-server.nix { };