Guix shell: guix.scm vs manifest.scm and reproducible builds

In his video, guix shell: Overview, Andrew talks about guix.scm and manifest.scm files…

What’s the difference between these files? When would I use one over the other? They kinda seem like they do a similar thing…

Andrew says:

  • guix shell will try to automatically load guix.scm first and manifest.scm second
  • guix.scm should contain a definition which returns a package
  • manifest.scm contains a manifest with a few packages

The 7.1 Getting Started section of the cookbook mainly focuses guix.scm. However a manifest.scm is briefly mentioned in 7.6 Bonus: Build manifest. (Although, I’m not sure if this manifest is the same manifest Andrew talks about.)

Ultimately, my objective is to create a reproducible development environment. I’m testing/playing with a very simple “Hello, World” Go app. I want to share an environment that has Go and GNU Make installed. I would also like to pin the versions of these tools. (I think I need Inferiors for this?)

For reproducible environments, Andrew also mentions using guix time-machine in his video. However 3 years later, now in 2025, is this still the way to get reproducible environments? Or would this section be replaced with Inferiors? (Futurile also mentions time-machine approach here.)

Should I create a guix.scm or manifest.scm in my project root?

3 Likes

You could think of manifest.scm as a bill of materials needed to build your project. This is handy when you want to work in an isolated environment using guix shell -m manifest.scm.

It’s also useful to use manifests for creating new profiles (guix package -p) and then you can switch profiles using emacs-guix, which is pretty cool.

You could also include a guix.scm which will basically contain the package definition similar to what would be submitted upstream in the guix repo. I find this less useful, since I mostly work in projects that are not using guix. Sometimes I do write them outside of the repo and then can use that in a guix shell or just guix build the project.

As far as the organization, I’ve seen:

project-root/
  guix.scm
  guix/
    manifest.scm

I’m sure there are other common layouts, cause Guile can be super flexible

2 Likes