Skip to content

Instantly share code, notes, and snippets.

@Brainiarc7
Last active May 10, 2016 11:27
Show Gist options
  • Save Brainiarc7/0943ed4ac4d59b6648de to your computer and use it in GitHub Desktop.
Save Brainiarc7/0943ed4ac4d59b6648de to your computer and use it in GitHub Desktop.
Use this to set up a functional Guix hacking space. Useful when porting apps to GNU Guix.

Setting up a Guix build env:

guix package -p $HOME/opt/guix-build-system --install autoconf \
    automake bzip2 gcc-toolchain gettext guile libgcrypt \
    pkg-config sqlite m4 make grep sed texinfo graphviz bash \
    help2man binutils coreutils xz tar findutils gawk git less \
    time which diffutils vim glibc-locales --fallback

Variables to set:

Determine the variables to set by running:

guix package -p ~/opt/guix-build-system --search-paths

My output (based on my setup) is:

export PATH="/home/lin/opt/guix-build-system/bin:/home/lin/opt/guix-build-system/sbin"
export INFOPATH="/home/lin/opt/guix-build-system/share/info"
export PKG_CONFIG_PATH="/home/lin/opt/guix-build-system/lib/pkgconfig"
export GUILE_LOAD_COMPILED_PATH="/home/lin/opt/guix-build-system/lib/guile/2.0/ccache"
export C_INCLUDE_PATH="/home/lin/opt/guix-build-system/include"
export CPLUS_INCLUDE_PATH="/home/lin/opt/guix-build-system/include"
export LIBRARY_PATH="/home/lin/opt/guix-build-system/lib"
export ACLOCAL_PATH="/home/lin/opt/guix-build-system/share/aclocal"
export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale

Do this from ~/source.build/guix as your working space.

env TEMPDIR=/gnu/tmp GUIX_PACKAGE_PATH=../guix-bioinformatics ./pre-inst-env guix package -A arrayfire

You can also do:

env TEMPDIR=/gnu/tmp GUIX_PACKAGE_PATH=../guix-bioinformatics ./pre-inst-env guix build -K {package-name}

For advanced debugging. The -K option retains the build directory even if the build fails. Very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment