Files
tsunagi/nix/package.nix
T
Aleksandr Bogomiakov 9dec056349 Prepare the 1.0.0 release
Set all seven workspace package versions to 1.0.0 and align their explicit
internal dependency requirements, Cargo.lock entries and Nix package version.
The CLI, agent status and tray now report 1.0.0 rather than 0.1.0. Release
packaging derives its version from the v1.0.0 tag through the existing
workflows, which classify the tag as a stable release.

This is a software version change only. Keep protocol wire versions, identity
derivation, handshake encoding and storage schemas unchanged; no data migration
or protocol upgrade is introduced relative to the current RC. External locked
dependencies are unchanged. Each protocol crate retains its own version field.

Validation on macOS:
- cargo fmt --all -- --check
- cargo clippy --locked --workspace --all-targets -- -D warnings
- cargo test --locked --workspace --all-targets: 532 passed, 2 ignored
- target/debug/tsng --version reports tsng 1.0.0
- Cargo metadata confirms all seven workspace packages are 1.0.0
- Compared Cargo.lock external package entries with HEAD: unchanged
- git diff --check

Tests ran outside the sandbox so real local test agents could open sockets.
Linux/Windows release builds, native desktop GUI and Nix builds were not run.
Commit and release tag are local; publishing is left to the user.
2026-11-16 15:03:52 +00:00

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.0";
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"
];
};
}