depot/third_party/nixpkgs/pkgs/servers/webmesh/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

49 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, gitUpdater
, testers
, webmesh
}:
buildGoModule rec {
pname = "webmesh";
version = "0.17.1";
src = fetchFromGitHub {
owner = "webmeshproj";
repo = pname;
rev = "v${version}";
hash = "sha256-Inh7j01/xBJgGYmX1tGBRNYjn1N4AO2sywBwZ8yXlsY=";
};
vendorHash = "sha256-xoc7NSdg5bn3aXgcrolJwv8jyrv2HEXFmiCtRXBVwVg=";
CGO_ENABLED = 0;
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.GitCommit=v${version}"
];
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 ];
};
}