3.4 An extended dev shell without duplication
Lesson 21 of 68 · 7:21
Up next in 5s…
About this lesson
Developers need more than the build does: language servers, linters, analyzers. But copying the package list into a second file means it goes stale. This lesson restructures the tmux project into a small release.nix layout where the package stays minimal and the dev shell inherits everything from it, then adds extra tools on top without repeating a single dependency.
In this video
- Splitting the project into a package attribute and a
devShellattribute in onerelease.nix - The
mkShellfeature that pulls a package's whole build environment into your shell, so the dependency list lives in exactly one place - Adding developer-only tools like
shellcheckand Clang analyzers that never touch the production build - Wiring
shell.nixanddefault.nixback up sonix-shellandnix-buildboth keep working - Why a CI that builds
release.nixturns your shell definition into a tested artifact instead of a 300-step README
After this lesson
You can lay out a project where users run one command for the package, developers run one command for a richer shell, and neither definition can drift from the other.