11 pname = "wg-access-server";
14 src = fetchFromGitHub {
15 owner = "freifunkMUC";
16 repo = "wg-access-server";
18 hash = "sha256-AhFqEmHrx9MCdjnB/YA3qU7KsaMyLO+vo53VWUrcL8I=";
21 proxyVendor = true; # darwin/linux hash mismatch
22 vendorHash = "sha256-YwFq0KxUctU3ElZBo/b68pyp4lJnFGL9ClKIwUzdngM=";
26 ldflags = [ "-s" "-w" ];
28 nativeBuildInputs = [ makeWrapper ];
30 checkFlags = [ "-skip=TestDNSProxy_ServeDNS" ];
32 ui = buildNpmPackage {
34 pname = "wg-access-server-ui";
36 npmDepsHash = "sha256-04AkSDSKsr20Jbx5BJy36f8kWNlzzplu/xnoDTkU8OQ=";
38 sourceRoot = "${src.name}/website";
46 substituteInPlace internal/services/website_router.go \
47 --replace-fail 'website/build' "${ui}"
51 VERSION=v${version} go generate buildinfo/buildinfo.go
56 wrapProgram $out/bin/wg-access-server \
57 --prefix PATH : ${lib.makeBinPath [ iptables ]}
61 tests = { inherit (nixosTests) wg-access-server; };
65 description = "An all-in-one WireGuard VPN solution with a web ui for connecting devices";
66 homepage = "https://github.com/freifunkMUC/wg-access-server";
67 license = licenses.mit;
68 maintainers = with maintainers; [ xanderio ];
69 mainProgram = "wg-access-server";