Guix shell now inside Emacs

birdculture1 pts0 comments

Guix shell now inside Emacs!

tusharhero's pages

Guix shell now inside Emacs!

~657 words. ~3 minutes.

tags: guix emacs programming

This is my submission for Emacs Carnival July 2026.

If you don't know what GNU Guix is: It's an advanced package manager<br>and a distribution of the GNU Operating system. With kernel support<br>for both GNU Linux-libre and, experimentally, for the GNU Hurd.

Guix's package manager is inspired by Nix, except that it uses GNU<br>Guile instead of Nixlang for package definitions, and system<br>definitions. Also replacing Systemd with GNU Shepherd (GNU's Init<br>System and Service manager).

One of the features I use the most with Guix is guix shell. Which<br>allows you to create software environments with the specified<br>packages.

I use this whenever I have to quickly try out software like some<br>programming language implementations, developer tool or build some<br>random project.

I also use this to specify the development dependencies of the<br>projects I work on, the dependencies are listed in a manifest.scm<br>file.

(specifications->manifest<br>'("gcc-toolchain"<br>"gdb"<br>"mupdf"<br>"make"))

If you run a guix shell in a directory containing the file, it gets<br>the appropriate dependencies for you.

Check the info manual for more information: (info "(guix) Invoking<br>guix shell").

Anyway, how does this tie back to GNU Emacs? If you are like most<br>Emacs users, you don't like starting a new instance of emacs for every<br>project…

$ you@yourcomputer ~/Projects/awesome-program$ guix shell<br>guix shell: loading environment from '/home/you/Projects/awesome-program/manifest.scm'...<br>$ you@yourcomputer ~/Projects/awesome-program$ emacs

Too annoying. What you instead want is to have a M-x guix-shell inside<br>Emacs itself. This was contributed to the emacs-guix package by yours<br>truly.

Check the info manual for more information: (info "(emacs-guix) Guix Shell").

Here's how I usually use it.

Firstly, let's say you feel like using Python. In the CLI, you would<br>do.

$ you@yourcomputer ~/Projects/awesome-program$ guix shell python

The same in Emacs is like so,

But what if you want to use multiple packages? Like

$ you@yourcomputer ~/Projects/awesome-program$ guix shell python python-numpy

Well, we got you covered there as well,

(Yeah, I forgot about the commas).

How about generating a manifest.scm file that you can use in the<br>future? In the CLI, you would do,

$ you@yourcomputer ~/Projects/awesome-program$ guix shell python python-numpy --export-manifest > manifest.scm

In Emacs, you would do,

I think there is still much to be desired in this interface. It<br>doesn't even attempt to provide of guix shell's power, for which it<br>would probably need a transient menu (library powering magit and the<br>other menus in emacs-guix).

You might also be interested in packages like ben.el which are more<br>general in scope.

Author: tusharheroemailreplace [at] with @, and put the domain for username, and vice versa: sdf.org [at] tusharhero

© tusharhero 2024-2026, check licenses page for details.

Date: 2026-07-31 Fri 00:00

Emacs 30.2 (Org mode 9.7.11)

guix emacs shell like projects manifest

Related Articles