Gabriella439 / macos-builder

Bootstrap a Linux build VM on macOS
BSD 3-Clause "New" or "Revised" License
76 stars 0 forks source link

Can no longer run on Mac Apple Silicon #6

Open fzakaria opened 1 week ago

fzakaria commented 1 week ago
> nix run github:Gabriella439/macos-builder
do you want to allow configuration setting 'extra-substituters' to be set to 'https://macos-builder.cachix.org' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? N
do you want to allow configuration setting 'extra-trusted-public-keys' to be set to 'macos-builder.cachix.org-1:HPWcq59/iyqQz6HEtlO/kjD/a7ril0+/XJc+SZ2LgpI=' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? N
warning: ignoring untrusted substituter 'https://macos-builder.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
error: a 'aarch64-linux' with features {} is required to build '/nix/store/xnpinlvbpnw9br16nsv8h7dqc19lz5ap-audit-disable.drv', but I am a 'aarch64-darwin' with features {apple-virt, benchmark, big-parallel, nixos-test}

Something changed and now I can no longer run the VM on apple silicon. I was going through your repo (thank you!) to learn what you.

fzakaria commented 1 week ago

Interestingly; nix run nixpkgs#darwin.linux-builder works fine.

Gabriella439 commented 1 week ago

Yeah, I should mark this repository deprecated or archived. nixpkgs#darwin.linux-builder is the final home of this work

fzakaria commented 1 week ago

Is there something I am missing in understanding why it wouldn't work?

I'm trying to break down what you are doing from first principles.

I am trying to understand the delta between what needs to work from:

{system ? builtins.currentSystem, pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-24.05.tar.gz") { inherit system; }}:
let
    nixos = pkgs.nixos ({config, lib, ...}: {
    });
in
nixos.vm

Xposted: https://discourse.nixos.org/

Does it rely on it needing to be in the NixOS cache ?

Thanks for your contributions.

Gabriella439 commented 1 week ago

yeah, the important bit is that it has to be cached. the reason that this was upstreamed into Nixpkgs was so that it could be built, signed, and cached by trusted infrastructure