build: add nix flake packaging #157
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!157
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-157"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@hazre on GitHub · 2026-12-02 03:51 UTC · original
hazre:nix-flake→main· +702 −42 · 9 files · 5 commits · closed without mergingAdds nix packaging for easy to use and reproducible builds, that works on any distro (just requires Nix to be installed)
Makes it so you can try xmem with a single command
run.confbeside the checkout can setGAME,WINEPREFIX,VICTORY_STATE,MESA_SHADER_CACHE_DIRandVKD3D_SHADER_CACHE_PATH, so the game path isoptional:
Also disables
wineopenxrinrun.sh: vkd3d-proton loads it for VR deviceextensions, and a running OpenXR runtime adds Linux-only
VK_KHR_external_{semaphore,fence}_fdextensions that winevulkan cannotexpose, so D3D12 device creation fails (
0x80004005, "no host GPU").Add Nix Packagingto build: add nix packaging33b1c1cc28to0e4352d5590e4352d559to740ca81f05740ca81f05tof240877eb6f240877eb6toc6e2e1f373c6e2e1f373to91bb0108ccbuild: add nix packagingto build: add nix flake packaging@Luxuride on GitHub · 2026-12-04 12:01 UTC · original
This loses to #116 on the thing that matters: #116 reuses
setup.sh/build.shand keeps the MSVC build, while this one builds the DLLs with MinGW —nix/package.nix:27rustPlatform.buildRustPackageunderpkgsCross.mingw-msvcrt-x86_64,:59adds-lmcfgthread,:62linkswindows.mcfgthreads.nix/package.nix:1asserts "only the C runtime differs", which is exactly where mingw's emulated TLS stops being true, and every tested run of this project uses the MSVC binary. A Nix package shipping a GNU-ABI binary is a second, untested platform, not a packaging change.Also unrelated behaviour bundled in:
env.sh:58rewrites prefix selection so existing Proton users get a fresh prefix at the next launch (no DXVK state, no shader cache, a "why is my prefix gone" report), and the tip commit disables wineopenxr, whichmaindoes not reference at all.Two parts are useful on their own and deserve their own PRs: the
run.shmode handling and readingrun.conffrom the invocation directory.@hazre on GitHub · 2026-12-04 14:20 UTC · original
I intentionally went with a nix first approach, not trying to reuse build.sh, because it wouldn't be nix native (using nix packaged packages). Regarding MSVC, it would make the setup
unfreeand it would depend on proprietary binaries. That's why I went with MinGW which ships as part of the main way to cross compile for windows in nixpkgs. I don't mind swapping that for MSVC so it stays closer to setup.sh if that's what the maintainers want.How paths are derived in
env.shgot changed, so it's easier to customize but it doesn't change the expected defaults.wineopenxr thing is something I noticed I use VR and it's just a harmless flag for people that don't use any headsets, it's mostly to avoid the logs being spammed about it and false positive errors like sdl3 not being found (because its required by the openxr loader)
I can split up into multiple PRs but this was just more convenient.
Pull request closed