Repository navigation
Conversation
matevl
force-pushed
the
feat/nix-flake
branch
from
October 29, 2026 17:20
2797d6f to
77883bc
Compare
Add a Nix flake providing a dev shell and a packaged build of the Avalonia app using buildDotnetModule. - NuGet dependencies are pinned in deps.json for the offline sandbox. - Single-file, ReadyToRun, trimming and AOT publish options are disabled for the Nix build only, since they require a self-contained publish and conflict with the Nix-provided runtime. - Install a desktop entry and icon.svg into the hicolor theme so the package shows up in application launchers. - Expose a lowercase ratiomaster-net alias in bin/. - Set meta.mainProgram so `nix run` works.
matevl
force-pushed
the
feat/nix-flake
branch
from
October 29, 2026 20:05
c4a0d59 to
e9f6b90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Nix flake so the project can be built, run and developed on Nix/NixOS without installing the .NET SDK manually.
Changes
flake.nix: providesdevShells.default: .NET 10 SDK plus the native libraries Avalonia needs (fontconfig, X11, GL, ...)packages.default: the app built withbuildDotnetModule, withLD_LIBRARY_PATHwrapped automatically viaruntimeDepsmeta.mainProgram, sonix runworksbin/ratiomaster-netlowercase alias next tobin/RatioMaster.NETdeps.json: NuGet dependencies pinned for the offline Nix sandboxflake.lock: pinned inputs.envrc:use flakefor direnv users.gitignore: ignore Nix/direnv artifactsBuild notes
PublishSingleFile,EnableCompressionInSingleFile,PublishReadyToRun,PublishTrimmedandPublishAotare disabled throughdotnetFlagsfor the Nix build only. Single-file compression requires a self-contained publish, which conflicts with using the Nix-provided runtime. The regulardotnet publishworkflow is unchanged.deps.jsonmust not contain crossgen2/runtime packs: the Nix SDK already provides them, and duplicates break the build.Usage
Updating NuGet dependencies
After changing package versions, regenerate
deps.json:If
deps.jsoncontains crossgen2 or runtime pack entries (e.g.microsoft.netcore.app.crossgen2.*), remove them.Testing
nix buildsucceeds on x86_64-linuxnix runlaunches the app