guix shell: Overview

Introduction

What guix shell is?

  • The tool for trying out software.
  • The tool for spinning up development environments.
  • Universal virtualenv.
  • The tool for making isolated environments.
  • Successor of guix environment.

Differences with guix environment

ad-hoc by default

Support for guix.scm and manifest.scm

  • guix shell automatically loads them if no arguments provided.
  • Difference between guix.scm and manifest.scm.
  • Show ~/tmp/htop example

Composable switches

Caching

guix shell -- make

Examples

Trying out a Package

guix shell htop -- htop

Executing in Isolated Environment

guix shell htop --preserve=$ --container

Preventing Garbage Collection

guix shell htop -r ./persistent-profile
guix gc --list-roots

Reproducible Development Environment

guix describe -f channels > ./channels.scm
guix time-machine -C ./channels.scm -- shell

How to Integrate it with direnv?

guix shell python python-numpy --search-paths

features/shellutils.scm

Questions

  • Other tools for making dev environments.
  • What to do with dev-time dependencies?

Conclusion

  • Universal, fast, feature rich, well-integrating and user-friendly tool.
  • We can make it ultimate by providing additional APIs for generating packages.

Links