trumank / mint

Deep Rock Galactic mod loader and integration
MIT License
231 stars 36 forks source link

Add nix flake #169

Closed valeth closed 5 months ago

valeth commented 5 months ago

This adds a simple nix flake, which can be used to get a reproducible development environment.

In addition to that it can be easily installed as a flake for people using the nix package manager.

trumank commented 5 months ago

Nice! I've been tinkering with Nix a bit recently and getting this project in particular to build was one of the challenges I was facing.

I see it's apparently necessary to copy over the zstd and udis86 DLLs for flatpak specifically? I don't see the resulting hook DLL dynamically linked to them though:

$ objdump -x x3daudio1_7.dll | grep 'DLL Name'
        DLL Name: advapi32.dll
        DLL Name: api-ms-win-core-synch-l1-2-0.dll
        DLL Name: kernel32.dll
        DLL Name: ntdll.dll
        DLL Name: ole32.dll
        DLL Name: oleaut32.dll
        DLL Name: psapi.dll
        DLL Name: userenv.dll
        DLL Name: ws2_32.dll
        DLL Name: KERNEL32.dll
        DLL Name: msvcrt.dll
        DLL Name: bcryptprimitives.dll
valeth commented 5 months ago

Initially the game was crashing when I enabled integration. So I was looking at the output of PROTON_LOG and it listed those DLLs as missing.

I just tested it again with those libraries removed, and the game seems to start just fine now. Probably some side effect from when I was messing around with the build dependencies.

valeth commented 5 months ago

Seems to still be necessary for some reason when building with cargo. Probably need to adjust the linker flags a bit.

valeth commented 5 months ago

I think I resolved all the linking problems, and this should be pretty much good to go now