mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
modules/rosetta: configure nix build sandbox to use rosetta
With this we can do x86_64 builds on aarch64
This commit is contained in:
parent
f431ee4a85
commit
a33d032939
1 changed files with 9 additions and 1 deletions
|
@ -50,11 +50,19 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
fileSystems."${cfg.mountPoint}" = {
|
fileSystems."${cfg.mountPoint}" = {
|
||||||
device = cfg.mountTag;
|
device = cfg.mountTag;
|
||||||
fsType = "virtiofs";
|
fsType = "virtiofs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
nix.settings = {
|
||||||
|
extra-platforms = [ "x86_64-linux" ];
|
||||||
|
extra-sandbox-paths = [
|
||||||
|
"/run/binfmt"
|
||||||
|
cfg.mountPoint
|
||||||
|
];
|
||||||
|
};
|
||||||
boot.binfmt.registrations.rosetta = {
|
boot.binfmt.registrations.rosetta = {
|
||||||
interpreter = "${cfg.mountPoint}/rosetta";
|
interpreter = "${cfg.mountPoint}/rosetta";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue