The overlay is not a proper overlay
viperML opened this issue · 0 comments
viperML commented
One of the usescases for overlays is using nixpkgs' splicing for cross-compilation. However, as the overlay exports a static package that doesn't use final.callPackage
from overlays, the splicing is lost.
nix-repl> pkgs = import <nixpkgs> { overlays = [(builtins.getFlake "github:mitchellh/zig-overlay").overlays.default]; }
nix-repl> :b pkgs.pkgsCross.aarch64-multiplatform.zigpkgs.master
error: a 'aarch64-linux' with features {} is required to build '/nix/store/p9shafw43vf4a1508z5sn0a3fsm3dj9k-zig-linux-aarch64-0.12.0-dev.3533+e5d900268.tar.xz.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, kvm, nixos-test}
nix-repl> :b pkgs.pkgsCross.aarch64-multiplatform.stdenv.cc
This derivation produced the following outputs:
info -> /nix/store/0wb6b7lz1xndy419ffi5vdfwl7lhj5hw-aarch64-unknown-linux-gnu-gcc-wrapper-13.2.0-info
man -> /nix/store/f01dvcx0dd5ikwj7ycm83fm3rcgcxamg-aarch64-unknown-linux-gnu-gcc-wrapper-13.2.0-man
out -> /nix/store/pic9zq502bybas3l0z0ymqdzkacx2h6l-aarch64-unknown-linux-gnu-gcc-wrapper-13.2.0
Note that I don't plan to use this (in fact I haven't even started my Zig journey), but just wanted to inform about this nix thing