Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The overlay is not a proper overlay #44

Open
viperML opened this issue Apr 5, 2024 · 1 comment
Open

The overlay is not a proper overlay #44

viperML opened this issue Apr 5, 2024 · 1 comment

Comments

@viperML
Copy link

viperML commented Apr 5, 2024

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

@Sammyalhashe
Copy link

Just a question as I am relatively new to nix. I tried this overlay on my linux machine and things worked properly. I tried it on my mac and all of a sudden zig was missing a ton of dependencies. Is what you're saying related? Just want to understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants