Merge pull request #282046 from marsam/gost-go120

gost: use Go 1.20
This commit is contained in:
Nick Cao 2024-01-19 10:32:28 -05:00 committed by GitHub
commit b03ae54f0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, buildGoModule }:
{ stdenv, lib, fetchFromGitHub, buildGoModule, fetchpatch }:
buildGoModule rec {
pname = "gost";
@ -11,7 +11,15 @@ buildGoModule rec {
sha256 = "sha256-UBjrWeBw9+qKQ/+1T1W/3e0vrigp540URIyM2d9iCE8=";
};
vendorHash = "sha256-lA4uW0cc0XqU9pjVEMapFLb3eD20Lea9PbkgL3sjJns=";
patches = [
# Add go1.20 support. Remove with the next release.
(fetchpatch {
url = "https://github.com/ginuerzh/gost/commit/0f7376bd10c913c7e6b1e7e02dd5fd7769975d78.patch";
hash = "sha256-pQNCvl7/huNrkM3+XHkGnvLYCzdjbMV6nef1KcMnKEw=";
})
];
vendorHash = "sha256-wAdNfhSPj9JUcI6Gcja6nRy68bVhV8B4PARR0WS9rjQ=";
postPatch = ''
substituteInPlace http2_test.go \
@ -41,8 +49,9 @@ buildGoModule rec {
--replace '{url.UserPassword("AES-256-GCM", "123456"), url.UserPassword("AES-256-GCM", "123456"), true},' ""
'';
__darwinAllowLocalNetworking = true;
meta = with lib; {
broken = stdenv.isDarwin;
description = "A simple tunnel written in golang";
homepage = "https://github.com/ginuerzh/gost";
license = licenses.mit;

View File

@ -8806,7 +8806,7 @@ with pkgs;
goreplay = callPackage ../tools/networking/goreplay { };
gost = callPackage ../tools/networking/gost {
buildGoModule = buildGo119Module; # go 1.20 build failure
buildGoModule = buildGo120Module; # go 1.21 build failure
};
gource = callPackage ../applications/version-management/gource { };