Open blazp7 opened 8 months ago
This actually does seem to work for me:
with import ./. {
crossSystem = "aarch64-linux";
};
buildDotnetModule {
name = "dotnet-sdk-smoke-test";
nugetDeps = emptyDirectory;
dotnet-sdk = buildPackages.dotnet-sdk;
dotnet-runtime = dotnet-runtime;
unpackPhase = ''
runHook preUnpack
dotnet new nugetconfig
dotnet new console -n test -o .
runHook postUnpack
'';
}
Note that even if rewrite this to be called with callPackage
, I have to specify buildPackages.dotnet-sdk
. I think buildDotnetModule
is probably doing some stuff that's incompatible with splicing.
Describe the bug
Cross compiling with buildDotnetModule does not work, however dotnet supports it.
Steps To Reproduce
Setup a basic environment, disable
boot.binfmt.emulatedSystems = ["aarch64-linux"];
if you have it oncreate flake.nix
create package.nix
create deps.nix
Expected behavior
This should work
nix build .#dotnet-cross-compile-test
Because this works
Errors
Extra context
Hopefully this is the correct setup for cross compiling, up until now i have been using qemu
boot.binfmt.emulatedSystems = ["aarch64-linux"];
however i would like to transition off because it is only working on nix 23.11, not on unstable (gives segfault error)Notify maintainers
@mdarocha , @corngood , @lilyinstarlight Got names from commit history of build-dotnet-module, sorry if you didnt want to be notified.
Add a :+1: reaction to issues you find important.