tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
748 stars 74 forks source link

error: package u-boot is not available, refusing to evaluate #78

Closed 7596ff closed 1 year ago

7596ff commented 1 year ago

I'm on a MacBook Pro 14 with an M1 Pro.

I've followed the installation instructions using the latest iso from the releases page. At the point where I am running nixos-install, I get the following error:

error: Package uboot-apple_m1_defconfig-2023.04.asahi2-1 in /nix/store/hmm1q79xgziadmx7hymqcvv3ingn3b8z-nixos-23.11.20230605.7409488/nixos/pkgs/misc/uboot/default.nix:124 is not available on the requested hostPlatform:
        hostPlatform.config = "x86_64-unknown-linux-gnu"
        package.meta.platforms = [
          "aarch64-linux"
        ]
        package.meta.badPlatforms = [ ]
        , refusing to evaluate.

It further suggests that I enable nixpkgs.config.allowUnsupportedSystem, but doing so leaves me with another error: an x86_64-linux with features {} is required to build <networkmanager>, but I am a aarch64-linux with features {benchmark, big-parallel, gccarch-armv8-a, kvm, nixos-test}

I can't seem to find anything online about this particular problem, and I am not experienced enough with nixpkgs to understand if there's something I'm doing that's causing this or not.

tpwrules commented 1 year ago

I apologize, this was a bug introduced by upstream Nixpkgs in nixos-generate-config that I noticed but forgot to address.

Open up /mnt/etc/nixos/hardware-configuration.nix, change the line which references x86_64-linux to instead say aarch64-linux, and you should be good to run the install command again. If you ever need to run nixos-generate-config again, you will need to redo this step.

I will work on getting this fixed.

Smaug123 commented 1 year ago

(The support you've been providing for free is considerably better and more timely than some that I've paid for. Thank you!)

tpwrules commented 1 year ago

https://github.com/NixOS/nixpkgs/pull/237218

Hopefully this will make its way to the release channel in a few days and I will do a new release.

tpwrules commented 1 year ago

This is fixed in the latest release.