Cached at:
07/31/26, 06:50 PM
# Guix shell now inside Emacs!
Source: [https://tusharhero.codeberg.page/guix-shell-in-emacs.html](https://tusharhero.codeberg.page/guix-shell-in-emacs.html)

*~649 words\. ~3 minutes\.*
If you don't know what[GNU Guix](https://guix.gnu.org/)is: It's an advanced package manager and a distribution of the[GNU Operating system](https://gnu.org/)\. With kernel support for both[GNU Linux\-libre](https://www.fsfla.org/ikiwiki/selibre/linux-libre/)and, experimentally, for the[GNU Hurd](https://www.gnu.org/software/hurd/)\.
Guix's package manager is inspired by[Nix](https://nixos.org/), except that it uses[GNU Guile](https://gnu.org/software/guile)instead of Nixlang for package definitions, system definitions\. Also replacing Systemd with[GNU Shepherd \(GNU's Init System and Service manager\)](https://gnu.org/software/shepherd)\.
One of the features I use the most with Guix is`guix shell`\. Which allows you to create software environments with the specified packages\.
I use this whenever I have to quickly try out software like some programming language implementations, developer tool or build some random project\.
I also use this to specify the development dependencies of the projects I work on, the dependencies are listed in a`manifest\.scm`file\.
```
(specifications->manifest
'("gcc-toolchain"
"gdb"
"mupdf"
"make"))
```
If you run a`guix shell`in a directory containing the file, it gets the appropriate dependencies for you\.
Anyway, how does this tie back to GNU Emacs? If you are like most Emacs users, you don't like starting a new instance of emacs for every project…
```
$ you@yourcomputer ~/Projects/awesome-program$ guix shell
guix shell: loading environment from '/home/you/Projects/awesome-program/manifest.scm'...
$ you@yourcomputer ~/Projects/awesome-program$ emacs
```
Too annoying\. What you instead want is to have a`M\-x guix\-shell`inside Emacs itself\. This was contributed to the`emacs\-guix`package by yours truly\.
Here's how I usually use it\.
Firstly, let's you feel like using Python\. In the CLI, you would do\.
```
$ you@yourcomputer ~/Projects/awesome-program$ guix shell python
```
The same in Emacs is like so,
[https://tusharhero.codeberg.page/media/guix-shell-single-package.webm](https://tusharhero.codeberg.page/media/guix-shell-single-package.webm)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,
[https://tusharhero.codeberg.page/media/guix-shell-multi-package.webm](https://tusharhero.codeberg.page/media/guix-shell-multi-package.webm)*\(Yeah, I forgot about the commas\)\.*
How about generating a`manifest\.scm`file that you can use in the 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,
[https://tusharhero.codeberg.page/media/guix-shell-export.webm](https://tusharhero.codeberg.page/media/guix-shell-export.webm)I think there is still much to be desired in this interface\. It doesn't even attempt to provide of`guix shell`'s power, for which it would probably need a transient menu \(library powering[magit](https://magit.vc/)and the other menus in`emacs\-guix`\)\.
You might also be interested in packages like[ben\.el](https://codeberg.org/pastor/ben.el)\.
emailreplace \[at\] with @, and put the domain for username, and vice versa: sdf\.org \[at\] tusharhero© tusharhero 2024\-2026, check[licenses page](https://tusharhero.codeberg.page/licenses.html)for details\.
Date: 2026\-07\-31 Fri 00:00
[Emacs](https://www.gnu.org/software/emacs/)30\.2 \([Org](https://orgmode.org/)mode 9\.7\.11\)