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

List of not-covered topics #21

Open
20 tasks
jonringer opened this issue Sep 8, 2022 · 5 comments
Open
20 tasks

List of not-covered topics #21

jonringer opened this issue Sep 8, 2022 · 5 comments

Comments

@jonringer
Copy link
Collaborator

jonringer commented Sep 8, 2022

Just need to write these down before I forget:

  • Dev shells through nix
  • wrapping
  • overrides
  • How to debug builds (nix develop .#)
  • hardware acceleration (addOpenGLRunpath)
  • Shell Hooks
  • Common trivial builders
  • patching
  • pname + version vs name?
  • meta?
  • How contribute to nixpkgs
  • flakes
  • overlays
  • Example build section?
    • go
    • cmake
    • gnumake (this is kind of already covered in the stdenv section)
    • autotools
    • rust
    • python
@nrdxp
Copy link
Contributor

nrdxp commented Sep 9, 2022

I have another one. Let attribute-sets let {}. Not sure if it needs to be covered though, as I think it's just the the syntatic desugaring of rec blocks, although a bit more explicit.

@jonringer
Copy link
Collaborator Author

Let attribute-sets

I'm not even familiar with this. But as an interesting aside, let blocks are implemented as a rec attr set.

@nrdxp
Copy link
Contributor

nrdxp commented Sep 10, 2022

I only found about them recently after getting to know the Nix tree-sitter grammar a bit. So for let {}, lets label the attribute-set x. It must contain a body key which is an arbitrary expression where all the other attributes defined in x are in scope. It is essentially another syntax for let in. And if body is an attribute-set itself, can be used as an alternative to rec. So:

let {
  x = 1;
  y = 2;
  body = x + y;
}

evals to 3.

@jonringer
Copy link
Collaborator Author

seems pretty advanced, in rust-lang book terms, I think that would be something which would go into the rust-nomicon instead "intro to nix" book :/

@jonringer
Copy link
Collaborator Author

Was thinking of moving back the build a package section and instead putting a how to use nixpkgs section. Then cover, the most common scenarios: using a flake, using nix develop, nix build, nix eval

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