The OpenRA nixpkgs package was a package I helped to maintain for a little while, but I stopped using NixOS for a few years and now I’m trying to update it. I have a more up-to-date version in my overlay. Specifically, I’d like to build the git commit version of the OpenRA engine. I know from packaging OpenRA’s git commits for the Arch User Repository that OpenRA now uses .NET SDK version 8.0 (compared to 6.0 when I last updated my overlay). So I updated the .NET package used to version 8.0. I also updated the commit to 2cb1e5f8c546196e911827e5d33f3b686c3bf452, along with its sha256 hash. I also managed to update its deps.json by running dotnet restore --packages out and nuget-to-json out > deps.json per this guide. Despite this, whenever I try to build the package, however, by adding it to my environment.systemPackages I get the error:
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package microsoft.aspnetcore.app.ref/8.0.21
shrinking RPATHs of ELF executables and libraries in /nix/store/g83wwpcsg6447z0jy0m1sm72mz9dx0fr-Microsoft.AspNetCore.App.Ref-8.0.21
checking for references to /build/ in /nix/store/g83wwpcsg6447z0jy0m1sm72mz9dx0fr-Microsoft.AspNetCore.App.Ref-8.0.21...
patching script interpreter paths in /nix/store/g83wwpcsg6447z0jy0m1sm72mz9dx0fr-Microsoft.AspNetCore.App.Ref-8.0.21
Normalized /nix/store/g83wwpcsg6447z0jy0m1sm72mz9dx0fr-Microsoft.AspNetCore.App.Ref-8.0.21/share/nuget/source/microsoft.aspnetcore.app.ref/8.0.21/microsoft.aspnetcore.app.ref.8.0.21.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package nunit.console/3.19.0
shrinking RPATHs of ELF executables and libraries in /nix/store/iqz1i46hmgam3g7mzl4653h2xwfjzp3k-NUnit.Console-3.19.0
checking for references to /build/ in /nix/store/iqz1i46hmgam3g7mzl4653h2xwfjzp3k-NUnit.Console-3.19.0...
patching script interpreter paths in /nix/store/iqz1i46hmgam3g7mzl4653h2xwfjzp3k-NUnit.Console-3.19.0
Normalized /nix/store/iqz1i46hmgam3g7mzl4653h2xwfjzp3k-NUnit.Console-3.19.0/share/nuget/source/nunit.console/3.19.0/nunit.console.3.19.0.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package nunit.consolerunner/3.19.0
shrinking RPATHs of ELF executables and libraries in /nix/store/iilhi80ayraddvz2xyam5iq3xf1bdwld-NUnit.ConsoleRunner-3.19.0
checking for references to /build/ in /nix/store/iilhi80ayraddvz2xyam5iq3xf1bdwld-NUnit.ConsoleRunner-3.19.0...
patching script interpreter paths in /nix/store/iilhi80ayraddvz2xyam5iq3xf1bdwld-NUnit.ConsoleRunner-3.19.0
Normalized /nix/store/iilhi80ayraddvz2xyam5iq3xf1bdwld-NUnit.ConsoleRunner-3.19.0/share/nuget/source/nunit.consolerunner/3.19.0/nunit.consolerunner.3.19.0.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package nunit.extension.nunitprojectloader/3.8.0
shrinking RPATHs of ELF executables and libraries in /nix/store/j663scqbnb2dprq6irw3rnyc14wbq8xc-NUnit.Extension.NUnitProjectLoader-3.8.0
checking for references to /build/ in /nix/store/j663scqbnb2dprq6irw3rnyc14wbq8xc-NUnit.Extension.NUnitProjectLoader-3.8.0...
patching script interpreter paths in /nix/store/j663scqbnb2dprq6irw3rnyc14wbq8xc-NUnit.Extension.NUnitProjectLoader-3.8.0
Normalized /nix/store/j663scqbnb2dprq6irw3rnyc14wbq8xc-NUnit.Extension.NUnitProjectLoader-3.8.0/share/nuget/source/nunit.extension.nunitprojectloader/3.8.0/nunit.extension.nunitprojectloader.3.8.0.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package nunit.extension.nunitv2driver/3.9.0
shrinking RPATHs of ELF executables and libraries in /nix/store/h617zfih6qkviprppc056hpxc1d4dp2a-NUnit.Extension.NUnitV2Driver-3.9.0
checking for references to /build/ in /nix/store/h617zfih6qkviprppc056hpxc1d4dp2a-NUnit.Extension.NUnitV2Driver-3.9.0...
patching script interpreter paths in /nix/store/h617zfih6qkviprppc056hpxc1d4dp2a-NUnit.Extension.NUnitV2Driver-3.9.0
building '/nix/store/px9lf1c6w6qx2viprh0i1mf969j74w3s-NUnit3TestAdapter-4.6.0.drv'...
Normalized /nix/store/h617zfih6qkviprppc056hpxc1d4dp2a-NUnit.Extension.NUnitV2Driver-3.9.0/share/nuget/source/nunit.extension.nunitv2driver/3.9.0/nunit.extension.nunitv2driver.3.9.0.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package nunit.extension.nunitv2resultwriter/3.8.0
shrinking RPATHs of ELF executables and libraries in /nix/store/5315k9ixp3r9lcykzs9yqfla6s058hb6-NUnit.Extension.NUnitV2ResultWriter-3.8.0
checking for references to /build/ in /nix/store/5315k9ixp3r9lcykzs9yqfla6s058hb6-NUnit.Extension.NUnitV2ResultWriter-3.8.0...
patching script interpreter paths in /nix/store/5315k9ixp3r9lcykzs9yqfla6s058hb6-NUnit.Extension.NUnitV2ResultWriter-3.8.0
building '/nix/store/90yk78k7pdkqfmdiy7c9bksyjdmkg2xh-Microsoft.NETCore.App.Host.linux-x64-8.0.21.drv'...
building '/nix/store/31vjs241kakzx88vr1qhhqc7icvqqghq-Microsoft.NETCore.App.Ref-8.0.21.drv'...
building '/nix/store/rdiqdpgwnp1ay0y2r9z82frv0d8s84x6-NUnit.Extension.TeamCityEventListener-1.0.7.drv'...
building '/nix/store/5qyc6nxk35ld8kl4zn403xg6s4msvh05-NUnit.Extension.VSProjectLoader-3.9.0.drv'...
building '/nix/store/lf3dkfmfmv0zbk6sr2r0sl9rxsmaxlhk-Roslynator.Analyzers-4.13.0.drv'...
building '/nix/store/dbqgxxmi2m3fzpkn41dqcfk6ymnr3rzd-Roslynator.Formatting.Analyzers-4.13.0.drv'...
100 5725k 100 5725k 0 0 1274k 0 0:00:04 0:00:04 --:--:-- 1977k
100 14.1M 100 14.1M 0 0 2793k 0 0:00:05 0:00:05 --:--:-- 3852k
Normalized /nix/store/5315k9ixp3r9lcykzs9yqfla6s058hb6-NUnit.Extension.NUnitV2ResultWriter-3.8.0/share/nuget/source/nunit.extension.nunitv2resultwriter/3.8.0/nunit.extension.nunitv2resultwriter.3.8.0.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package nunit3testadapter/4.6.0
shrinking RPATHs of ELF executables and libraries in /nix/store/73lqzap10hbag4r8hkqzg0yhvnq4fd1m-NUnit3TestAdapter-4.6.0
checking for references to /build/ in /nix/store/73lqzap10hbag4r8hkqzg0yhvnq4fd1m-NUnit3TestAdapter-4.6.0...
patching script interpreter paths in /nix/store/73lqzap10hbag4r8hkqzg0yhvnq4fd1m-NUnit3TestAdapter-4.6.0
Normalized /nix/store/73lqzap10hbag4r8hkqzg0yhvnq4fd1m-NUnit3TestAdapter-4.6.0/share/nuget/source/nunit3testadapter/4.6.0/nunit3testadapter.4.6.0.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package microsoft.netcore.app.host.linux-x64/8.0.21
Patchelfing microsoft.netcore.app.host.linux-x64/8.0.21/runtimes/linux-x64/native/singlefilehost as microsoft.netcore.app.host.linux-x64/8.0.21/runtimes/linux-x64/native/singlefilehost.48.nix-patched
patchelf: cannot find section '.interp'. The input file is most likely statically linked
Patchelfing microsoft.netcore.app.host.linux-x64/8.0.21/runtimes/linux-x64/native/apphost as microsoft.netcore.app.host.linux-x64/8.0.21/runtimes/linux-x64/native/apphost.48.nix-patched
shrinking RPATHs of ELF executables and libraries in /nix/store/5crwmw7845ddpqdhnywpd92c9rxvmkk0-Microsoft.NETCore.App.Host.linux-x64-8.0.21
shrinking /nix/store/5crwmw7845ddpqdhnywpd92c9rxvmkk0-Microsoft.NETCore.App.Host.linux-x64-8.0.21/share/nuget/packages/microsoft.netcore.app.host.linux-x64/8.0.21/runtimes/linux-x64/native/singlefilehost
shrinking /nix/store/5crwmw7845ddpqdhnywpd92c9rxvmkk0-Microsoft.NETCore.App.Host.linux-x64-8.0.21/share/nuget/packages/microsoft.netcore.app.host.linux-x64/8.0.21/runtimes/linux-x64/native/libnethost.so
shrinking /nix/store/5crwmw7845ddpqdhnywpd92c9rxvmkk0-Microsoft.NETCore.App.Host.linux-x64-8.0.21/share/nuget/packages/microsoft.netcore.app.host.linux-x64/8.0.21/runtimes/linux-x64/native/apphost
checking for references to /build/ in /nix/store/5crwmw7845ddpqdhnywpd92c9rxvmkk0-Microsoft.NETCore.App.Host.linux-x64-8.0.21...
patching script interpreter paths in /nix/store/5crwmw7845ddpqdhnywpd92c9rxvmkk0-Microsoft.NETCore.App.Host.linux-x64-8.0.21
Normalized /nix/store/5crwmw7845ddpqdhnywpd92c9rxvmkk0-Microsoft.NETCore.App.Host.linux-x64-8.0.21/share/nuget/source/microsoft.netcore.app.host.linux-x64/8.0.21/microsoft.netcore.app.host.linux-x64.8.0.21.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package microsoft.netcore.app.ref/8.0.21
shrinking RPATHs of ELF executables and libraries in /nix/store/pg9ys2h86v5r9k4lxnqlwcxjgxcw1rr3-Microsoft.NETCore.App.Ref-8.0.21
checking for references to /build/ in /nix/store/pg9ys2h86v5r9k4lxnqlwcxjgxcw1rr3-Microsoft.NETCore.App.Ref-8.0.21...
patching script interpreter paths in /nix/store/pg9ys2h86v5r9k4lxnqlwcxjgxcw1rr3-Microsoft.NETCore.App.Ref-8.0.21
Normalized /nix/store/pg9ys2h86v5r9k4lxnqlwcxjgxcw1rr3-Microsoft.NETCore.App.Ref-8.0.21/share/nuget/source/microsoft.netcore.app.ref/8.0.21/microsoft.netcore.app.ref.8.0.21.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package nunit.extension.teamcityeventlistener/1.0.7
shrinking RPATHs of ELF executables and libraries in /nix/store/64r9kfbw49g6a7p74wvw4y1ln7ls7h0d-NUnit.Extension.TeamCityEventListener-1.0.7
checking for references to /build/ in /nix/store/64r9kfbw49g6a7p74wvw4y1ln7ls7h0d-NUnit.Extension.TeamCityEventListener-1.0.7...
patching script interpreter paths in /nix/store/64r9kfbw49g6a7p74wvw4y1ln7ls7h0d-NUnit.Extension.TeamCityEventListener-1.0.7
Normalized /nix/store/64r9kfbw49g6a7p74wvw4y1ln7ls7h0d-NUnit.Extension.TeamCityEventListener-1.0.7/share/nuget/source/nunit.extension.teamcityeventlistener/1.0.7/nunit.extension.teamcityeventlistener.1.0.7.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package nunit.extension.vsprojectloader/3.9.0
shrinking RPATHs of ELF executables and libraries in /nix/store/ywq673ckg4wpv2r3l4q7x3hwpq5byayn-NUnit.Extension.VSProjectLoader-3.9.0
checking for references to /build/ in /nix/store/ywq673ckg4wpv2r3l4q7x3hwpq5byayn-NUnit.Extension.VSProjectLoader-3.9.0...
patching script interpreter paths in /nix/store/ywq673ckg4wpv2r3l4q7x3hwpq5byayn-NUnit.Extension.VSProjectLoader-3.9.0
Normalized /nix/store/ywq673ckg4wpv2r3l4q7x3hwpq5byayn-NUnit.Extension.VSProjectLoader-3.9.0/share/nuget/source/nunit.extension.vsprojectloader/3.9.0/nunit.extension.vsprojectloader.3.9.0.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package roslynator.analyzers/4.13.0
shrinking RPATHs of ELF executables and libraries in /nix/store/r31hjiywmckdvpnyzvix1v3v7x2csqxd-Roslynator.Analyzers-4.13.0
checking for references to /build/ in /nix/store/r31hjiywmckdvpnyzvix1v3v7x2csqxd-Roslynator.Analyzers-4.13.0...
patching script interpreter paths in /nix/store/r31hjiywmckdvpnyzvix1v3v7x2csqxd-Roslynator.Analyzers-4.13.0
Normalized /nix/store/r31hjiywmckdvpnyzvix1v3v7x2csqxd-Roslynator.Analyzers-4.13.0/share/nuget/source/roslynator.analyzers/4.13.0/roslynator.analyzers.4.13.0.nupkg
Running phase: unpackPhase
building '/nix/store/07ydswsffj0hxrqrsdns7l6hapcdwwjz-NuGet.CommandLine-6.12.2.drv'...
building '/nix/store/qzxbqym6mdn3qvka86zr4wbb7nf05xk3-OpenRA-SDL2-CS-1.0.42.drv'...
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package roslynator.formatting.analyzers/4.13.0
shrinking RPATHs of ELF executables and libraries in /nix/store/6hfqcjmwbdq6rwhrag9ldjc1s9y144b0-Roslynator.Formatting.Analyzers-4.13.0
checking for references to /build/ in /nix/store/6hfqcjmwbdq6rwhrag9ldjc1s9y144b0-Roslynator.Formatting.Analyzers-4.13.0...
patching script interpreter paths in /nix/store/6hfqcjmwbdq6rwhrag9ldjc1s9y144b0-Roslynator.Formatting.Analyzers-4.13.0
Normalized /nix/store/6hfqcjmwbdq6rwhrag9ldjc1s9y144b0-Roslynator.Formatting.Analyzers-4.13.0/share/nuget/source/roslynator.formatting.analyzers/4.13.0/roslynator.formatting.analyzers.4.13.0.nupkg
Running phase: unpackPhase
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package nuget.commandline/6.12.2
shrinking RPATHs of ELF executables and libraries in /nix/store/y59cl18d63dysh60y3h3kjdmjk3ns8m7-NuGet.CommandLine-6.12.2
checking for references to /build/ in /nix/store/y59cl18d63dysh60y3h3kjdmjk3ns8m7-NuGet.CommandLine-6.12.2...
patching script interpreter paths in /nix/store/y59cl18d63dysh60y3h3kjdmjk3ns8m7-NuGet.CommandLine-6.12.2
Running phase: unpackPhase
Normalized /nix/store/y59cl18d63dysh60y3h3kjdmjk3ns8m7-NuGet.CommandLine-6.12.2/share/nuget/source/nuget.commandline/6.12.2/nuget.commandline.6.12.2.nupkg
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
no Makefile or custom buildPhase, doing nothing
Running phase: installPhase
Running phase: fixupPhase
Patching package openra-sdl2-cs/1.0.42
patchelf: cannot find section '.interp'. The input file is most likely statically linked
patchelf: cannot find section '.interp'. The input file is most likely statically linked
shrinking RPATHs of ELF executables and libraries in /nix/store/r2y6bxgy3lrqzklm8g5qijcwja8w74m1-OpenRA-SDL2-CS-1.0.42
shrinking /nix/store/r2y6bxgy3lrqzklm8g5qijcwja8w74m1-OpenRA-SDL2-CS-1.0.42/share/nuget/packages/openra-sdl2-cs/1.0.42/native/linux-x64/SDL2.so
shrinking /nix/store/r2y6bxgy3lrqzklm8g5qijcwja8w74m1-OpenRA-SDL2-CS-1.0.42/share/nuget/packages/openra-sdl2-cs/1.0.42/native/linux-arm64/SDL2.so
checking for references to /build/ in /nix/store/r2y6bxgy3lrqzklm8g5qijcwja8w74m1-OpenRA-SDL2-CS-1.0.42...
patching script interpreter paths in /nix/store/r2y6bxgy3lrqzklm8g5qijcwja8w74m1-OpenRA-SDL2-CS-1.0.42
Normalized /nix/store/r2y6bxgy3lrqzklm8g5qijcwja8w74m1-OpenRA-SDL2-CS-1.0.42/share/nuget/source/openra-sdl2-cs/1.0.42/openra-sdl2-cs.1.0.42.nupkg
building '/nix/store/kiibsk1c490gzpwaz0cr0m3ljb4p6vfv-openra-git-2cb1e5f8c546196e911827e5d33f3b686c3bf452.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/qmyvwpvcmwgv4vryc0zv3794hx4y0vqi-source
source root is source
Running phase: patchPhase
Running phase: configureNuget
ln: failed to create symbolic link '/build/nuget.86CZMW/fallback/microsoft.netcore.app.host.linux-x64/8.0.21': File exists
error: builder for '/nix/store/kiibsk1c490gzpwaz0cr0m3ljb4p6vfv-openra-git-2cb1e5f8c546196e911827e5d33f3b686c3bf452.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/5ak70d30c90vaxsp0c69rjfvd1xmy13f-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wz3dpakg12i1d1xvlylqmhqvmqprygry-nixos-system-nixos-25.05.811874.daf6dc47aa4b.drv' failed to build
And I am stumped as to how to fix this error. I have tried getting GitHub’s Copilot to help me with this, but that failed (didn’t even change the error I received). If the problem path was hard-coded, I’d just add a line to remove it if I knew where to add such a line, but the nuget.[0-9a-z]* part of the path varies each time I rebuild. Also, I don’t know where I’d add such a line as I cannot see a field in the .NET packaging docs for modifying the commands run as part of the configureNuget packaging phase.
I did ask Copilot for how to do this, and it helped me get past this particular error, but it just gave me a heap of errors that seem to be due to nuget attempting to download packages in a sandboxed environment. If you want the details, I committed the changes Copilot suggested to a separate branch.