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

04 - The function call and inherit #3

Open
feynmanliang opened this issue May 24, 2024 · 3 comments
Open

04 - The function call and inherit #3

feynmanliang opened this issue May 24, 2024 · 3 comments

Comments

@feynmanliang
Copy link

The function call and inherit

How are you supposed to know this? You read it somewhere and copy/paste like the rest of us. Welcome to Nix! I actually still can't find that info in the official docs. If you know where it is, open an issue here.

I think args.system in https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/impure.nix#L17 is why?

@Evertras
Copy link
Owner

Nice find, but still need to find it in the docs! :D

@jameshulse
Copy link

@Evertras
Copy link
Owner

Evertras commented Sep 1, 2024

A helpful link for inherit but unfortunately doesn't solve the puzzle of how to know that this:

makePkgs = import nixpkgs;
pkgs = makePkgs { inherit system; };

...is even a thing. Basically I'm not sure where it says in an official doc somewhere that doing import nixpkgs will give you a function back and that you should pass it an attribute set with system in it.

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

3 participants