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

Expose nixpkgs' setup hook #33

Open
bandithedoge opened this issue Oct 9, 2023 · 2 comments
Open

Expose nixpkgs' setup hook #33

bandithedoge opened this issue Oct 9, 2023 · 2 comments

Comments

@bandithedoge
Copy link

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

@mitchellh
Copy link
Owner

mitchellh commented Dec 7, 2023

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.

@bandithedoge
Copy link
Author

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.

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