How to set up a nix-shell with GNU build toolchain (build-essential)?

Start with an empty shell.nix:

{ pkgs ? import <nixpkgs> { } }:

pkgs.mkShell {
  buildInputs = [
  ];
}

… and you’ll basically get that. As you discover more build dependencies you can add them to that shell.nix.

2 Likes