Unverified Commit cda3cb90 authored by Donovan Glover's avatar Donovan Glover Committed by GitHub
Browse files

webmesh: 0.1.2 -> 0.17.1 (#336948)

parents 7bc0e523 b4ec5ff8
Loading
Loading
Loading
Loading
+17 −8
Original line number Diff line number Diff line
{ lib
, buildGoModule
, fetchFromGitHub
, gitUpdater
, testers
, webmesh
}:

buildGoModule rec {
  pname = "webmesh";
  version = "0.1.2";
  version = "0.17.1";

  src = fetchFromGitHub {
    owner = "webmeshproj";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-S7kenBrnhM8V0TdbRe+CJP2XGHG/dZbfGVwdRurPeP8=";
    hash = "sha256-Inh7j01/xBJgGYmX1tGBRNYjn1N4AO2sywBwZ8yXlsY=";
  };

  vendorHash = "sha256-LBd5IrNFGkEhz+joDv6juL7WuoFyoqCXnmEHFB1K6Nc=";
  vendorHash = "sha256-xoc7NSdg5bn3aXgcrolJwv8jyrv2HEXFmiCtRXBVwVg=";

  CGO_ENABLED = 0;

  subPackages = [ "cmd/node" "cmd/wmctl" ];
  subPackages = [ "cmd/webmesh-node" "cmd/webmeshd" "cmd/wmctl" ];

  ldflags = [
    "-w"
    "-s"
    "-X github.com/webmeshproj/webmesh/pkg/version.Version=${version}"
    "-X github.com/webmeshproj/webmesh/pkg/version.Commit=v${version}"
    "-X github.com/webmeshproj/webmesh/pkg/version.GitCommit=v${version}"
  ];

  postInstall = ''
    mv $out/bin/node $out/bin/webmesh-node
  '';
  passthru = {
    updateScript = gitUpdater { rev-prefix = "v"; };
    tests = {
      webmesh-version = testers.testVersion {
        package = webmesh;
      };
    };
  };

  meta = with lib; {
    description = "Simple, distributed, zero-configuration WireGuard mesh provider";
    mainProgram = "webmesh-node";
    homepage = "https://webmeshproj.github.io";
    license = licenses.asl20;
    maintainers = with maintainers; [ bbigras ];