Skip to content

buildDotnetModule with ReadyToRun restricts the derivation to a single platform #230848

@natsukium

Description

@natsukium

Describe the bug

Since .NET6, the crossgen2 used when using R2R, has been separated from the runtime. [1]
Therefore, when R2R is specified, nix-build -A ${pkg}.fetch-deps gets the platform-specific crossgen2. [2]
At this time, crossgen2 for multiple platforms cannot coexist, so the platform of derivation is restricted.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run nix-build -A tone.passthru.fetch-deps on platform other than "x86_64-linux".

Expected behavior

The package can be built on multiple platforms.

Screenshots

Additional context

Disabling "R2R" solves this problem since the platform-dependent crossgen2 is no longer used.
In this case, we can set it as the default value for dotnetRestoreFlags and dotnetBuildFlags (or dotnetFlags?).

Notify maintainers

@IvarWithoutBones, @mdarocha, @corngood
I mentioned those who have committed to buildDotnetModule a lot.

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.90.1-microsoft-standard-WSL2, NixOS, 23.05 (Stoat), 23.05.20230507.7975a3c`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"nixos-22.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions