reproxy: 1.0.0 → 1.1.1

This commit is contained in:
Nikolay Korotkiy 2024-02-02 22:34:46 +04:00
parent 676609b0f0
commit 3fafcf0683
No known key found for this signature in database
GPG Key ID: D1DE6D7F693663A5

View File

@ -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";