Skip to content

Add a health check to confirm that rosetta was installed #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
srid opened this issue Jul 10, 2024 · 0 comments
Open

Add a health check to confirm that rosetta was installed #26

srid opened this issue Jul 10, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@srid
Copy link
Member

srid commented Jul 10, 2024

Some projects explicitly use x86_64-darwin packages even on ARM macs:

https://github.com/nammayatri/nammayatri/blob/ad935fb58e8dd909a311777b39792c1a40fade01/Backend/nix/services/nammayatri.nix#L292-L296

Without installing rosetta, the dev would see:

image

For this, we need to add a check to verify that Nix can build packages for x86_64-darwin.

It might be worth doing this in a more general fashion, by calling the health check canBuildFor. So nammayatri flake can contain:

{ 
  nix-health.default = {
    can-build-for.systems."aarch64-darwin" = [ "x86_64-darwin" ];
  };
}

Or, if that's an overkill, we can just check that rosetta was installed, which would then look like:

{
  nix-health.default = {
    rosetta = {
      installed = true;
    };
  };
}

https://apple.stackexchange.com/a/464165/5007

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant