tpwrules / nixos-apple-silicon

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

Error building asahi-peripheral-firmware on nixos-unstable #209

Open evfeal opened 3 weeks ago

evfeal commented 3 weeks ago

When running nixos-install, I get thrown this error

Traceback (most recent call last):
  File "/nix/store/474vlrgkkj4zh2qc1gfq7b0cpic79xf3-asahi-fwextract-0.6.9/bin/.asahi-fwextract-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/474vlrgkkj4zh2qc1gfq7b0cpic79xf3-asahi-fwextract-0.6.9/lib/python3.11/site-packages/asahi_firmware/update.py", line 52, in main
    update_firmware(args.source, args.dest)
  File "/nix/store/474vlrgkkj4zh2qc1gfq7b0cpic79xf3-asahi-fwextract-0.6.9/lib/python3.11/site-packages/asahi_firmware/update.py", line 34, in update_firmware
    col = KernelFWCollection(str(source))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/474vlrgkkj4zh2qc1gfq7b0cpic79xf3-asahi-fwextract-0.6.9/lib/python3.11/site-packages/asahi_firmware/kernel.py", line 12, in __init__
    self.load(source_path)
  File "/nix/store/474vlrgkkj4zh2qc1gfq7b0cpic79xf3-asahi-fwextract-0.6.9/lib/python3.11/site-packages/asahi_firmware/kernel.py", line 29, in load
    name, kernel = img4p_extract(im4p)
                   ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/474vlrgkkj4zh2qc1gfq7b0cpic79xf3-asahi-fwextract-0.6.9/lib/python3.11/site-packages/asahi_firmware/img4.py", line 58, in img4p_extract
    name, cdata = decode_header(decoder)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/474vlrgkkj4zh2qc1gfq7b0cpic79xf3-asahi-fwextract-0.6.9/lib/python3.11/site-packages/asahi_firmware/img4.py", line 36, in decode_header
    assert tag.nr == asn1.Numbers.Sequence
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
'/nix/store/8qr24q3vsw14r32ka9fy0gjykzhcpfag-busybox-1.36.1/bin/ftpget' -> '/nix/store/rx4xwpghg57995wa59dpis2a02c6angi-extra-utils/bin/ftpget'
'/nix/store/8qr24q3vsw14r32ka9fy0gjykzhcpfag-busybox-1.36.1/bin/ftpput' -> '/nix/store/rx4xwpghg57995wa59dpis2a02c6angi-extra-utils/bin/ftpput'
  CC    build/dcp.o
error: builder for '/nix/store/l8gc61i268nsnzcknzfrg7v2fk0i8inw-asahi-peripheral-firmware.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/719rvi6bm0cny5fa5xhbdsylsb852i04-asahi-peripheral-firmware-zstd.drv' failed to build
error: 1 dependencies of derivation '/nix/store/6kqm8pixzsr6s12ww2fvl3hm2llc2jiy-firmware.drv' failed to build
error: 1 dependencies of derivation '/nix/store/52xxycc0b5pvyp3kswsqylpacg23pwg9-nixos-system-hostname-24.05.20240521.3eaeaeb.drv' failed to build
error:
       … while calling the 'head' builtin

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:809:9:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: 1 dependencies of derivation '/nix/store/9wanwx7ifhqfki5hhsdfsb3n10dq6r3l-references.nix.drv' failed to build