nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 gitUpdater,
6 testers,
7 webmesh,
8}:
9
10buildGoModule rec {
11 pname = "webmesh";
12 version = "0.17.1";
13
14 src = fetchFromGitHub {
15 owner = "webmeshproj";
16 repo = "webmesh";
17 rev = "v${version}";
18 hash = "sha256-Inh7j01/xBJgGYmX1tGBRNYjn1N4AO2sywBwZ8yXlsY=";
19 };
20
21 vendorHash = "sha256-xoc7NSdg5bn3aXgcrolJwv8jyrv2HEXFmiCtRXBVwVg=";
22
23 env.CGO_ENABLED = 0;
24
25 subPackages = [
26 "cmd/webmesh-node"
27 "cmd/webmeshd"
28 "cmd/wmctl"
29 ];
30
31 ldflags = [
32 "-w"
33 "-s"
34 "-X github.com/webmeshproj/webmesh/pkg/version.Version=${version}"
35 "-X github.com/webmeshproj/webmesh/pkg/version.GitCommit=v${version}"
36 ];
37
38 passthru = {
39 updateScript = gitUpdater { rev-prefix = "v"; };
40 tests = {
41 webmesh-version = testers.testVersion {
42 package = webmesh;
43 };
44 };
45 };
46
47 meta = {
48 description = "Simple, distributed, zero-configuration WireGuard mesh provider";
49 mainProgram = "webmesh-node";
50 homepage = "https://webmeshproj.github.io";
51 license = lib.licenses.asl20;
52 maintainers = with lib.maintainers; [ bbigras ];
53 };
54}