DEVELOPER GUIDE

Build with GNU Guix

Warning

This page and OGS builds with GNU Guix are currently work-in-progress!

GNU Guix is a distribution of the GNU operating system but also a package manager. You can use it to create bit-by-bit reproducible (Linux) binaries of ogs.

The package definitions for OGS are defined in this repo which can be used as a Guix channel. guix is currently installed on envinf3.

Building

From local source tree

# builds ogs serial config and starts isolated shell (like in a container)
guix time-machine -C scripts/guix/channels.scm -- shell -C -m scripts/guix/manifest-serial.scm \
  -L scripts/guix/packages
# ogs petsc config
guix time-machine -C scripts/guix/channels.scm -- shell -C -m scripts/guix/manifest-petsc.scm \
  -L scripts/guix/packages

To create an archivable Apptainer container:

guix time-machine -C scripts/guix/channels.scm -- pack -m scripts/guix/manifest-serial.scm \
  -L scripts/guix/packages -RR --format=squashfs

To get the dependency tree:

guix time-machine -C scripts/guix/channels.scm -- graph ogs-serial | dot -Tpdf > dag.pdf

From web URL

wget https://gitlab.opengeosys.org/ogs/ogs/-/raw/master/scripts/guix/channels.scm
guix time-machine -C ./channels.scm -- build ogs-serial \
  --with-source=ogs@6.5.7-testing=https://gitlab.opengeosys.org/ogs/ogs/-/archive/master/ogs-master.tar.bz2

Developing

guix time-machine -C scripts/guix/channels.scm -- \
  shell --container --nesting --network --development ogs-serial \ # OR ogs-petsc
  openssl nss-certs coreutils bash git
# Now in guix shell with all dependencies installed:
export CMAKE_PRESET_BUILD_DIR_PREFIX=guix/ # presets then create e.g. ../build/guix/release
cmake --preset release -DOGS_BUILD_PROCESSES=SteadyStateDiffusion
cmake --build --preset release

As a shortcut you can use this script:

./scripts/guix/ogs-env.sh ogs-serial # or `ogs-petsc` for parallel

You can also play with e.g. different versions of dependencies, here changing OpenMPI to 4.1.6:

guix time-machine -C scripts/guix/channels.scm -- \
  shell --container --nesting --network --development ogs-petsc \
  openssl nss-certs coreutils bash git \
  --with-source=openmpi@4.1.6=https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.bz2

This article was written by Lars Bilke. If you are missing something or you find an error please reach out to us on our forum.
Generated with Hugo 0.164.0 in CI job 825193 | Last revision: April 20, 2026
Commit: refactor(MeshLib): remove PropertyVector::push_back 870422dde  | Edit this page on