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

Learning Journey tutorial - sharing dependencies between default.nix and shell.nix #600

Closed
2 tasks
zmitchell opened this issue Jun 19, 2023 · 2 comments · Fixed by #675
Closed
2 tasks
Assignees
Labels
tracking A stopgap for issue dependencies

Comments

@zmitchell
Copy link
Contributor

Project description

A user can drop into a development shell with only a default.nix. However, if they want other tools as part of their development workflow that they don't want included in their build, they need to create a shell.nix with a packages attribute. In order to still perform the build in the shell the dependencies and inputs from the derivation also need to be present. The naive way of making this work is by simply duplicating the buildInputs etc from the default.nix. A more ergonomic way of making this work is by allowing the shell.nix to use the inputs already defined in the default.nix. In this tutorial we'd like to show the user how to accomplish this.

Steps

  • Submit a PR with an outline of the tutorial
  • Submit a PR with a draft of the tutorial

Considerations

We'd like this tutorial to be focused around a developer workflow where the shell.nix is providing a development environment.

This means we'd like the tutorial to have a concrete project that the reader is working on, like building a program.

This means that the program needs to be incredibly easy to build/package with Nix so that this part of the tutorial doesn't distract the user from what you're trying to teach them: how to share dependencies between default.nix and shell.nix.

@zmitchell zmitchell added tracking A stopgap for issue dependencies learning journey labels Jun 19, 2023
@zmitchell zmitchell mentioned this issue Jun 19, 2023
26 tasks
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-19-tutorial-series-call-for-feedback-1/29377/1

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-22-learning-journey-working-group-meeting-notes-14/29490/1

@zmitchell zmitchell self-assigned this Jun 28, 2023
@zmitchell zmitchell changed the title First steps tutorial - sharing dependencies between default.nix and shell.nix Learning Journey tutorial - sharing dependencies between default.nix and shell.nix Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracking A stopgap for issue dependencies
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants