Hello. Thank you for this great topic.
So I decided to try build my own image for rpi zero w.
I basically used provided flake and try to compile on aws aarch64 machine.
However, without luck.
System is 23.11 and this issue (unable to unpack archive) seems to be weird.
What I missed? NixOS on aws is just some random selected comunity ami so maybe should I start to dig here?
error: builder for '/nix/store/vy12b7lmf3y548whsjfv3m81vlm8g2zz-libpng-apng-armv6l-unknown-linux-gnueabihf-1.6.40.drv' failed with exit code 1;
last 3 log lines:
> unpacking sources
> unpacking source archive /nix/store/jpqz1p52xw3jlhc8w143v92k0iaar2i4-libpng-1.6.40.tar.xz
> do not know how to unpack source archive /nix/store/jpqz1p52xw3jlhc8w143v92k0iaar2i4-libpng-1.6.40.tar.xz
For full logs, run 'nix log /nix/store/vy12b7lmf3y548whsjfv3m81vlm8g2zz-libpng-apng-armv6l-unknown-linux-gnueabihf-1.6.40.drv'.
error: 1 dependencies of derivation '/nix/store/2q5j823rwvrr8431y8dyg9i2w3cdrbsr-freetype-armv6l-unknown-linux-gnueabihf-2.13.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9v3h4811dqsqc65yrvwq4y7mbyz7s8k0-fontconfig-armv6l-unknown-linux-gnueabihf-2.14.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/kdw5vbdbnp6djlqggmcw02lniqkay0zd-fontconfig-conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/li54ky7kl6yhjq204rkba2aig66x2hqk-system-path.drv' failed to build
error (ignored): error: cannot unlink '/run/user/0/nix-build-binutils-armv6l-unknown-linux-gnueabihf-2.40.drv-0/binutils-2.40/ld/.deps': Directory not empty
error (ignored): error: cannot unlink '/run/user/0/nix-build-libtasn1-armv6l-unknown-linux-gnueabihf-4.19.0.drv-0': Directory not empty
error: 1 dependencies of derivation '/nix/store/ban8rmijp7l85kvhgy5jg3qsrynahgm1-nixos-system-nixos-23.11.20240115.b8dd8be.drv' failed to build
error: 1 dependencies of derivation '/nix/store/sg2x74hlkf721z4355s8sy3zs9sqwm1y-ext4-fs.img.zst-armv6l-unknown-linux-gnueabihf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/34ywqprscl80bmpwcpc2ihggnrk021wa-nixos-sd-image-23.11.20240115.b8dd8be-armv6l-linux.img-armv6l-unknown-linux-gnueabihf.drv' failed to build
[root@ip-172-31-16-53:~/flake]# nix --extra-experimental-features nix-command log /nix/store/vy12b7lmf3y548whsjfv3m81vlm8g2zz-libpng-apng-armv6l-unknown-linux-gnueabihf-1.6.40.drv
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/vy12b7lmf3y548whsjfv3m81vlm8g2zz-libpng-apng-armv6l-unknown-linux-gnueabihf-1.6.40.drv^*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/jpqz1p52xw3jlhc8w143v92k0iaar2i4-libpng-1.6.40.tar.xz
do not know how to unpack source archive /nix/store/jpqz1p52xw3jlhc8w143v92k0iaar2i4-libpng-1.6.40.tar.xz
Not sure about that error, I think I also saw this onetime, but don’t know anymore how I got it and also what I did to solve it. Could you maybe provide more logs (nix log /nix/store/vy12b7lmf3y548whsjfv3m81vlm8g2zz-libpng-apng-armv6l-unknown-linux-gnueabihf-1.6.40.drv) and the exact flake (of course redact secrets) you’re using?
Thank you very much for that tip. That did the trick in combination with my initial device tree overlay. I2C now works.
I then tried to analyze if I can get the &i2c1 version to work. Reading about your two links I now understand that these &[node] things are semantic sugar to extend other nodes. I then tried to use that in combination with the hardware.i2c.enable = true but I still had no success as I already predicted since this doesn’t change the dtb file (I already analyzed this in my last post). I then tried to remove the -i2c suffix and still had the hardware.i2c.enable = true set which works now. So
Output of nix log is provided in previous comment.
Just:
do not know how to unpack source archive /nix/store/jpqz1p52xw3jlhc8w143v92k0iaar2i4-libpng-1.6.40.tar.xz