From 3fafcf0683f662f4197598533979f12e6cd0a3c4 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Fri, 2 Feb 2024 22:34:46 +0400 Subject: [PATCH] =?UTF-8?q?reproxy:=201.0.0=20=E2=86=92=201.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/servers/reproxy/default.nix | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/pkgs/servers/reproxy/default.nix b/pkgs/servers/reproxy/default.nix index 21077aa83d1c..f90ad1246cf8 100644 --- a/pkgs/servers/reproxy/default.nix +++ b/pkgs/servers/reproxy/default.nix @@ -2,42 +2,34 @@ buildGoModule rec { pname = "reproxy"; - version = "1.0.0"; + version = "1.1.1"; src = fetchFromGitHub { owner = "umputun"; - repo = pname; + repo = "reproxy"; rev = "v${version}"; - hash = "sha256-ac4fOOMht2WGlrXLN95NEIA8ivqghhVuxHnBumvajx0="; + hash = "sha256-/ydpqi7O4z41YxYb/RngPWk/79h3MIxAopzqIDMgw1g="; }; - postPatch = '' - # Requires network access - substituteInPlace app/main_test.go \ - --replace "Test_Main" "Skip_Main" - substituteInPlace app/proxy/proxy_test.go \ - --replace "TestHttp_matchHandler" "SkipHttp_matchHandler" - '' + lib.optionalString stdenv.isDarwin '' - # Fails on Darwin. - # https://github.com/umputun/reproxy/issues/77 - substituteInPlace app/discovery/provider/file_test.go \ - --replace "TestFile_Events" "SkipFile_Events" \ - --replace "TestFile_Events_BusyListener" "SkipFile_Events_BusyListener" - ''; - vendorHash = null; ldflags = [ "-s" "-w" "-X main.revision=${version}" ]; - installPhase = '' - install -Dm755 $GOPATH/bin/app $out/bin/reproxy + checkFlags = [ + # Requires network access or fluky + "-skip=^Test(_MainWithPlugin|_MainWithSSL|_Main|Http_matchHandler|Http_withBasicAuth|File_Events|File_Events_BusyListener)$" + ]; + + postInstall = '' + mv $out/bin/{app,reproxy} ''; meta = with lib; { description = "Simple edge server / reverse proxy"; homepage = "https://reproxy.io/"; + changelog = "https://github.com/umputun/reproxy/releases/tag/${src.rev}"; license = licenses.mit; maintainers = with maintainers; [ sikmir ]; mainProgram = "reproxy";