Build fails on raspberry pi (and probably other aarch64-linux systems too)
Pretty much the title. I'm trying to install the project on my raspberry pi but it fails with: error: a 'x86_64-linux' with features {} is required to build '/nix/store/zzizbfc1cr0lvz09yi7khk59agqg7fch-clap-4.5.35.drv', but I am a 'aarch64-linux' with features {benchmark, big-parallel, gccarch-armv8-a, kvm, nixos-test}.
Looks like one of the dependencies is not arm compatible. If I can provide any additional information just tell me.
I'm not quite sure how this is happening. I had asked various people to test on aarch64, and it's supposed to be working. Generally. The CI seems to be passing at least.
This looks like a Nix misconfiguration, or a similar setup issue. Are you cross-compiling?
Tested on aarch64-linux via VPS and it built from source and ran fine:
❯ nix build github:notashelf/microfetch
❯ ./result/bin/microfetch
▟█▖ ▝█▙ ▗█▛ michael@o1 ~
▗▄▄▟██▄▄▄▄▄▝█▙█▛ ▖ System NixOS 26.05 (Yarara)
▀▀▀▀▀▀▀▀▀▀▀▘▝██ ▟█▖ Kernel Linux 6.17.12 (aarch64)
▟█▛ ▝█▘▟█▛ Shell fish
▟█████▛ ▟█████▛ Uptime 17 hours, 59 minutes
▟█▛▗█▖ ▟█▛ Desktop Unknown (Tty)
▝█▛ ██▖▗▄▄▄▄▄▄▄▄▄▄▄ Memory 5.13 GiB / 23.40 GiB (22%)
▝ ▟█▜█▖▀▀▀▀▀██▛▀▀▘ Storage (/) 0.00 GiB / 4.00 GiB (0%)
▟█▘ ▜█▖ ▝█▛ Colors
❯ ./result/bin/microfetch -v
❯ ./result/bin/microfetch --version
Microfetch 0.4.12
❯ uname -a
Linux o1 6.17.12 #1-NixOS SMP Fri Dec 12 17:40:23 UTC 2025 aarch64 GNU/Linux
It also build on my raspberry pi.
[foko@fokopi:~]$ nix build github:notashelf/microfetch
*skipped build-host errors*
[foko@fokopi:~]$ uname -a
Linux fokopi 6.12.34 #1-NixOS SMP Tue Jan 1 00:00:00 UTC 1980 aarch64 GNU/Linux
[foko@fokopi:~]$ ./result/bin/microfetch
▟█▖ ▝█▙ ▗█▛ foko@fokopi ~
▗▄▄▟██▄▄▄▄▄▝█▙█▛ ▖ System NixOS 25.11 (Xantusia)
▀▀▀▀▀▀▀▀▀▀▀▘▝██ ▟█▖ Kernel Linux 6.12.34 (aarch64)
▟█▛ ▝█▘▟█▛ Shell bash
▟█████▛ ▟█████▛ Uptime 3 days, 3 hours, 36 minutes
▟█▛▗█▖ ▟█▛ Desktop Unknown (Tty)
▝█▛ ██▖▗▄▄▄▄▄▄▄▄▄▄▄ Memory 0.87 GiB / 3.69 GiB (23%)
▝ ▟█▜█▖▀▀▀▀▀██▛▀▀▘ Storage (/) 108.22 GiB / 117.14 GiB (92%)
▟█▘ ▜█▖ ▝█▛ Colors
[foko@fokopi:~]$ ./result/bin/microfetch --version
Microfetch 0.4.12
From my own knowledge, the error does in fact occur when doing cross-compiling shenanigans. I believe you might be building the x86_64-linux package instead of the aarch64 one.
I checked it and it seems to work with nix run or nix build but when used inside home manager it doesn't want to be built. Also there's no crosscompiling involved.
I've also tried this on my RPI5 and seems to be building fine. I would assume there are some cross-platform oddities on your end. Please check buildPlatform and hostPlatform for your system configuration.
When using nix repl both homeConfigurations."liyua@<hostname>".pkgs.stdenv.hostPlatform.system and homeConfigurations."liyua@<hostname>".pkgs.stdenv.buildPlatform.system return aarch64-linux. Same for the corresponding system configuration. Not quite sure what's the issue here.
Does it work if you clone the repository and run nix build .#microfetch ?
Yeah it works with nix build .#microfetch do you have any idea where I would have to look to fix it? Both pkgs.stdenv.hostPlatform/buildPlatform (both on the nixos config as well as the hm config), config.nixpkgs.hostPlatform/buildPlatform as well as config.nixpkgs.system in the hm config evaluate to aarch64-linux.
Closing as stale