Add Nix flake for reproducible builds#136
Open
randomizedcoder wants to merge 4 commits intoModelioOpenSource:masterfrom
Open
Add Nix flake for reproducible builds#136randomizedcoder wants to merge 4 commits intoModelioOpenSource:masterfrom
randomizedcoder wants to merge 4 commits intoModelioOpenSource:masterfrom
Conversation
Adds a Nix flake with: - Source build using two-phase FOD for Maven/Tycho dependency caching - Dev shell with Maven, JDK 11, native libs, and auto-generated toolchains.xml - OCI container image via dockerTools.buildLayeredImage - xvfb-based smoke test - nixfmt formatter - Documentation in nix/README.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add modelio-src flake input pinned to commit 53eb603 - Use pinned source for mvnDeps FOD instead of local working tree - Local edits no longer invalidate the maven dependency cache - Update pin with: nix flake update modelio-src Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactoring: - Extract shared values (version, toolchains.xml, build.properties fixup, runtime libs) into nix/lib.nix — eliminates 3x toolchains duplication - Split FOD into nix/maven-deps.nix — package.nix is now main build only - Wire mvnDeps as separate callPackage in flake.nix Reproducibility improvements: - Delete maven-metadata-*.xml in FOD (contains <lastUpdated> timestamps) - Set -Dproject.build.outputTimestamp=1980-01-01T00:00:02Z for deterministic JARs, following nixpkgs convention (scenebuilder, nzbhydra2, etc.) - Update FOD hash to reflect new cleanup New features: - Add nix/container-run.nix — one-shot script to load and run the Docker container with X11 forwarding, config persistence, and workspace mount - Expose as `nix run .#container-run` Housekeeping: - Add /result to .gitignore (Nix build output symlink) - Add usage comments to top of flake.nix - Fix nixfmt deprecation warning (nixfmt → nixfmt-classic) - Update nix/README.md with new file layout, reproducibility strategy section, and container-run documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sigmanificient
suggested changes
Mar 24, 2026
- Bump nixpkgs input from nixos-24.11 to nixos-25.11 - Rename webkitgtk_4_0 → webkitgtk_4_1 (removed upstream) - Apply nix fmt - Verified: nix build, nix flake check, nix run .#container-run Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
nix develop), OCI container image (nix build .#container), xvfb-based smoke test (nix flake check), andnix runsupportnix/README.mddocumenting usage, architecture, and design decisionsWhat's included
flake.nixflake.locknix/package.nixnix/shell.nixnix/container.nixnix/test.nixnix/README.mdTest plan
nix buildcompletes successfullynix runlaunches Modelionix developprovides working Maven + JDK environmentnix build .#containerproduces loadable OCI imagenix flake checkpasses smoke testsnix fmtruns cleanly (idempotent)🤖 Generated with Claude Code