Learning Journey tutorial - sharing dependencies between default.nix
and shell.nix
#600
Labels
tracking
A stopgap for issue dependencies
default.nix
and shell.nix
#600
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 ashell.nix
with apackages
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 thebuildInputs
etc from thedefault.nix
. A more ergonomic way of making this work is by allowing theshell.nix
to use the inputs already defined in thedefault.nix
. In this tutorial we'd like to show the user how to accomplish this.Steps
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
andshell.nix
.The text was updated successfully, but these errors were encountered: