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

**URL:** https://discourse.nixos.org/t/how-to-set-up-a-nix-shell-with-gnu-build-toolchain-build-essential/38579
**Category:** Help
**Created:** [January 20, 2024, 3:53pm UTC](https://discourse.nixos.org/t/how-to-set-up-a-nix-shell-with-gnu-build-toolchain-build-essential/38579 "2024-01-20T15:53:02Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![raboof](https://discourse.nixos.org/user_avatar/discourse.nixos.org/raboof/32/1681_2.png) [@raboof](https://discourse.nixos.org/u/raboof)
#### Post date: [January 20, 2024, 4:00pm UTC](https://discourse.nixos.org/t/how-to-set-up-a-nix-shell-with-gnu-build-toolchain-build-essential/38579/2 "2024-01-20T16:00:17Z")

</div>

Start with an empty shell.nix:

```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`.

---

_[View the full topic](https://discourse.nixos.org/t/how-to-set-up-a-nix-shell-with-gnu-build-toolchain-build-essential/38579)._
