Nix Development Shells

May 2023

I recently wanted to develop some Emacs code. But I didn't want to do the work of finding all the different dependencies needed to install them.

I'm running NixOS, so luckily, there is a command for that.

nix develop nixpkgs#emacs

nix develop will open a shell with all the dependencies needed to develop that package.

This is a flake-based command, so I believe it needs to be building a flake.

As above, you need to specify that the package is inside nixpkgs if you're trying to use one from there. Do that with nixpkgs#your-package-here. You can presumably develop flakes from elsewhere by specifying different locations.

After running the command, I was able to build Emacs without having to install a single dependency! Thanks, Nix!

previous

< Deleting files in Emacs
tag: emacs

next

An Improved Emacs Search >
tag: nix

previous

< Have Emacs questions? Ask emacs!
tag: til

next

An Improved Emacs Search >