Nix 101 Course / Section 3: Dev shells: the productivity unlock
Premium

3.4 An extended dev shell without duplication

Lesson 21 of 68 · 7:21

placeholder thumbnail

Sign in, then buy this course to watch

Free account · no credit card needed

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 devShell attribute in one release.nix
  • The mkShell feature 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 shellcheck and Clang analyzers that never touch the production build
  • Wiring shell.nix and default.nix back up so nix-shell and nix-build both keep working
  • Why a CI that builds release.nix turns 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.