Read the exit network and endpoint from the published routing choice. Start a normal WireGuard exchange at 120 seconds for that tunnel even when idle. BoringTun keeps the current key usable during the exchange and owns retry and expiry. Switching or clearing the route also moves or removes the renewal policy. Show Idle in the tray, on Android and in CLI status after 30 seconds without IP traffic on a previously established tunnel. Keep key changes and keepalives out of activity, and keep waiting packets, missing paths and transport errors visible. Preserve queued flow tags when a native keepalive occupies a slot and drain pending IP on key confirmation. Bump the local status IPC to 26 and update the workspace, Android and Nix versions. Upgrade the daemon and desktop clients together. Mesh protocols, key lifetimes and persistent storage remain compatible. On macOS arm64 the initial workspace run passed 602 tests. A separate 181-second two-agent test observed renewal only in the selected mesh and delivered its first internet packet after idle. Formatting and strict workspace Clippy passed on the release sources. The maintainer requested publication without waiting for another full test run.
100 lines
2.2 KiB
Nix
100 lines
2.2 KiB
Nix
{
|
|
withTray ? true,
|
|
lib,
|
|
rustPlatform,
|
|
pkg-config,
|
|
copyDesktopItems,
|
|
wrapGAppsHook3,
|
|
gtk3,
|
|
libayatana-appindicator,
|
|
libglvnd,
|
|
libxkbcommon,
|
|
vulkan-loader,
|
|
wayland,
|
|
libx11,
|
|
libxcursor,
|
|
libxi,
|
|
libxrandr,
|
|
}:
|
|
|
|
let
|
|
# The tray is an egui app that loads graphics, windowing and appindicator
|
|
# libraries at run time, so they have to be put on its library path by hand.
|
|
trayRuntimeLibs = [
|
|
libayatana-appindicator
|
|
libglvnd
|
|
libxkbcommon
|
|
vulkan-loader
|
|
wayland
|
|
libx11
|
|
libxcursor
|
|
libxi
|
|
libxrandr
|
|
];
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = if withTray then "tsunagi" else "tsunagi-cli";
|
|
version = "1.0.5";
|
|
|
|
src = lib.cleanSource ../.;
|
|
cargoLock.lockFile = ../Cargo.lock;
|
|
|
|
cargoBuildFlags = [
|
|
"--bin"
|
|
"tsng"
|
|
]
|
|
++ lib.optionals withTray [
|
|
"--bin"
|
|
"tsunagi-tray"
|
|
];
|
|
|
|
# The suite opens real sockets and interfaces; it runs in CI instead.
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
]
|
|
++ lib.optionals withTray [
|
|
copyDesktopItems
|
|
wrapGAppsHook3
|
|
];
|
|
buildInputs = lib.optionals withTray [
|
|
gtk3
|
|
libayatana-appindicator
|
|
];
|
|
|
|
dontWrapGApps = true;
|
|
|
|
# The development shell runs unwrapped Cargo binaries and needs the same
|
|
# dynamically loaded libraries as the installed tray wrapper.
|
|
passthru = { inherit trayRuntimeLibs; };
|
|
|
|
postInstall = ''
|
|
install -Dm644 dist/linux/50-tsunagi-resolved.rules \
|
|
"$out/share/doc/tsunagi/50-tsunagi-resolved.rules"
|
|
''
|
|
+ lib.optionalString withTray ''
|
|
install -Dm644 dist/linux/tsunagi.svg \
|
|
"$out/share/icons/hicolor/scalable/apps/tsunagi.svg"
|
|
install -Dm644 dist/linux/tsunagi-tray.desktop \
|
|
"$out/share/applications/tsunagi-tray.desktop"
|
|
'';
|
|
|
|
postFixup = lib.optionalString withTray ''
|
|
wrapProgram "$out/bin/tsunagi-tray" \
|
|
"''${gappsWrapperArgs[@]}" \
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath trayRuntimeLibs}:/run/opengl-driver/lib
|
|
'';
|
|
|
|
meta = {
|
|
description = "Serverless mesh VPN: join a network with a name and a secret";
|
|
homepage = "https://github.com/house-of-vanity/tsunagi";
|
|
license = lib.licenses.wtfpl;
|
|
mainProgram = "tsng";
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
};
|
|
}
|