Merge pull request #167325 from aaronjheng/wireguard-go

wireguard-go: 0.0.20210424 -> 0.0.20220316
This commit is contained in:
Mario Rodas 2022-05-21 17:05:19 -05:00 committed by GitHub
commit 48c257520b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 1828 deletions

View File

@ -1,25 +1,33 @@
{ lib, buildGoPackage, fetchzip }:
{ lib, buildGoModule, fetchzip, testers, wireguard-go }:
buildGoPackage rec {
buildGoModule rec {
pname = "wireguard-go";
version = "0.0.20210424";
goPackagePath = "golang.zx2c4.com/wireguard";
version = "0.0.20220316";
src = fetchzip {
url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
sha256 = "RUUueSsfEi1H+ckrnPKqbVlWONhCplMMftlyAmwK+ss=";
sha256 = "sha256-OQiG92idGwOXWX4H4HNmk2dmRM2+GtssJFzavhj1HxM=";
};
goDeps = ./deps.nix;
postPatch = ''
# Skip formatting tests
rm -f format_test.go
'';
passthru.updateScript = ./update.sh;
vendorSha256 = "sha256-MrHkOj0YfvAm8zOowXzl23F1NPTCO0F8vMMGT/Y+nQ0=";
subPackages = [ "." ];
ldflags = [ "-s" "-w" ];
postInstall = ''
mv $out/bin/wireguard $out/bin/wireguard-go
'';
doCheck = true;
passthru.tests.version = testers.testVersion {
package = wireguard-go;
version = "v${version}";
};
meta = with lib; {
description = "Userspace Go implementation of WireGuard";

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused common-updater-scripts vgo2nix
set -eu -o pipefail
basedir="$(git rev-parse --show-toplevel)"
version="$(curl -sL https://build.wireguard.com/distros.txt | sed -n 's/^upstream\tgo\t\([^\t]\+\)\t.*/\1/p')"
update-source-version wireguard-go "$version"
vgo2nix -dir $(nix-build -A wireguard-go.src) -outfile "$basedir/pkgs/tools/networking/wireguard-go/deps.nix"
if [[ -f "$basedir/wireguard-go.log" ]];then
rm "$basedir/wireguard-go.log"
fi

View File

@ -11754,7 +11754,9 @@ with pkgs;
wipe = callPackage ../tools/security/wipe { };
wireguard-go = callPackage ../tools/networking/wireguard-go { };
wireguard-go = callPackage ../tools/networking/wireguard-go {
buildGoModule = buildGo118Module;
};
wkhtmltopdf = libsForQt514.callPackage ../tools/graphics/wkhtmltopdf { };