Skip to content

Build/CI: Add base nix build for cross compiles from linux#26

Open
tnichols217 wants to merge 4 commits into
developfrom
30-add-nix-build
Open

Build/CI: Add base nix build for cross compiles from linux#26
tnichols217 wants to merge 4 commits into
developfrom
30-add-nix-build

Conversation

@tnichols217
Copy link
Copy Markdown

No description provided.

@tnichols217 tnichols217 requested a review from zgypa May 26, 2026 18:16
@tnichols217 tnichols217 self-assigned this May 26, 2026
Copy link
Copy Markdown

@zgypa-agent zgypa-agent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model:claude-sonnet-4-6

Review: Missing Description + Bundled Unrelated Change

Step 1 — Tests

The flake.nix introduced in this PR defines no checks output, so nix flake check will not run the unit-test suite. The AGENTS.md-documented test command (dotnet test BFD9010/BFD9010.FhirApi.Tests/...) cannot be verified in a nix-only environment without an explicit checks target. Please add a checks.default or checks.tests output to flake.nix that runs the xUnit suite via dotnet test, or document in the PR description why tests are intentionally excluded from the flake.


Step 2 — PR Description is empty (blocker)

Both the PR body and the corresponding issue #26 are empty. The PR title alone is not sufficient:

  1. What problem are you solving? Is this enabling CI from a Linux host? Is it for developers without Windows? Is it for reproducible release builds?
  2. Has nix build succeeded end-to-end (does a bfd9010.exe come out the other side)? If so, on which system?
  3. Has the generated bfd9010-server wrapper (wine launcher) been tested on Linux/macOS?
  4. Why is BFD9010/BFD9010.Scanner/ScanConfig.cs modified? This change is completely unrelated to the nix build infrastructure (see below).

Step 3 — Unrelated application change bundled in

ScanConfig.cs changes the hardcoded default config file path from the executable directory to ~/Desktop/VidarScans/scan_config.ini. This is a functional behaviour change for every user on every platform and has nothing to do with adding a Nix build.

AGENTS.md states: "For single-file releases, the default base directory is a user temp folder; use --config to keep settings in a stable location." The new hardcoded ~/Desktop/VidarScans/ path contradicts this guidance and will silently create that directory on every startup via Directory.CreateDirectory in GetConfigPath.

Please extract this change into its own PR with its own description and issue reference, or explain in the PR description why it is a prerequisite for the nix build.


No further review will be done until the description is provided and the bundled ScanConfig.cs change is either extracted to a separate PR or clearly justified.

Copy link
Copy Markdown
Member

@zgypa zgypa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree mostly with the agent's review. Please do add any comments or discuss by replying if you don't agree.

Comment thread BFD9010/BFD9010.Scanner/ScanConfig.cs Outdated
@tnichols217
Copy link
Copy Markdown
Author

1 Tests

I will add the dotnet test to the flake, I didn't already do that because it wasn't in the flake prior so I did not change it

2 Description

This PR adds nix building support to the project, allowing for linux users to build the windows executable, and run it within WINE. It additionally is for reproducible builds, ensuring the quality of all built artifacts. The nix build succeeds end-to-end and the program does work in WINE, albeit without testing on a real Vidar scanner yet, but this can be future work in a future PR if changes are necessary. We additionally lock the nuget dependencies with nix to ensure proper nix dependencies for the build. The config file location was changed due to the fact that the nix-store is read only, so the program is not allowed to add configuration files to it once it has been built, additionally, it is bad practice to edit the application directory outside of the installer.

3 Unrelated changes

This was not an unrelated change as it directly contributes to being able to build with nix.

@tnichols217 tnichols217 requested a review from zgypa-agent May 27, 2026 22:22
@tnichols217
Copy link
Copy Markdown
Author

All requested changes have been made, except for keeping the .zed file in there as it is necessary for the editor to work with the cross-compile setup and serves as an example for all developers regardless of which editor they use. Config path directory was moved to APPDATA as well, instead of in the scan directory. The nix build was moved into its own file, and finally, nix checks do not apply this project as you cannot test windows binaries on linux (even though you can build them on linux). My suggested solution to this is to test in a windows VM or set up a complicated wine-wrapped windows test runner, but that is outside the scope of this PR as it didn't exist prior to this PR, so nothing broke since then.

@tnichols217 tnichols217 requested a review from zgypa May 28, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants