base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12 (#356361)
[NixPkgs.git] / pkgs / tools / networking / wireguard-go / default.nix
blobec14c180d8ff2e02e11d05a5eba2866ffa7d8ea1
1 { lib, buildGoModule, fetchzip, testers, wireguard-go }:
3 buildGoModule rec {
4   pname = "wireguard-go";
5   version = "0.0.20230223";
7   src = fetchzip {
8     url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz";
9     sha256 = "sha256-ZVWbZwSpxQvxwySS3cfzdRReFtHWk6LT2AuIe10hyz0=";
10   };
12   postPatch = ''
13     # Skip formatting tests
14     rm -f format_test.go
15   '';
17   vendorHash = "sha256-i6ncA71R0hi1SzqCLphhtF3yRAHDmOdYJQ6pf3UDBg8=";
19   subPackages = [ "." ];
21   ldflags = [ "-s" "-w" ];
23   postInstall = ''
24     mv $out/bin/wireguard $out/bin/wireguard-go
25   '';
27   passthru.tests.version = testers.testVersion {
28     package = wireguard-go;
29     version = "v${version}";
30   };
32   meta = with lib; {
33     description = "Userspace Go implementation of WireGuard";
34     homepage = "https://git.zx2c4.com/wireguard-go/about/";
35     license = licenses.mit;
36     maintainers = with maintainers; [ kirelagin zx2c4 ];
37     mainProgram = "wireguard-go";
38   };