mitchellh/zig-overlay

Expose nixpkgs' setup hook

bandithedoge opened this issue · 2 comments

The zig derivation in nixpkgs now provides a useful setup hook. It would make sense for this flake's nightly packages to do so as well.

https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/compilers/zig/generic.nix#L57-L61

I'm not familiar with how this works. Does this make sense given the fact that our packages are binary packages? If so, I'm happy to provide it to provide some consistency but probably would ask for a PR for it since its not a feature of the Nix package I actively use.

In the case of zig, the setup hook runs zig build and friends in the build phase so you don't have to write it yourself (like stdenv.mkDerivation runs make by default). It might be easy enough to reuse the script straight from nixpkgs.