Advertisement
Guest User

build_guix_from_sources.sh

a guest
Feb 20th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.56 KB | None | 0 0
  1. $ cat ~/build_guix_from_sources.sh
  2. #!/bin/bash
  3. [ -z "$CLEANED" ] && exec /usr/bin/env -i CLEANED=1 /bin/bash --login --noprofile --norc "$0" "$@"
  4. set -o errexit
  5.  
  6. build_profile=/home/yoann/.local/opt/guix-build-system
  7. prefix_install=/home/yoann/.local
  8.  
  9. echo "==== DISPLAY ENV ====="
  10. env
  11. echo "==== ===="
  12.  
  13. #####
  14. ## PREPARE ENV
  15. ######
  16.  
  17. echo "==== Preparing env..... ===="
  18. guix package -p ${build_profile} --fallback --install \
  19.     autoconf automake bash binutils bzip2 coreutils diffutils findutils gawk gcc \
  20.     gcc-toolchain gettext git glibc-utf8-locales gnutls graphviz grep guile guile-git guile-json \
  21.     guix help2man less libgcrypt m4 make nss-certs pkg-config sed sqlite strace \
  22.     tar texinfo time vim which xz zlib
  23. export LC_ALL=en_US.UTF-8
  24. export GUIX_PROFILE=${build_profile}
  25. source ${GUIX_PROFILE}/etc/profile
  26. export PATH=${GUIX_PROFILE}/bin:$PATH
  27. eval `guix package -p ${GUIX_PROFILE} --search-paths`
  28. export GUIX_LOCPATH=${GUIX_PROFILE}/lib/locale:$GUIX_LOCPATH
  29. export ACLOCAL_PATH=/usr/share/aclocal:$ACLOCAL_PATH
  30. echo "==== ===="
  31.  
  32. echo "==== DISPLAY ENV ====="
  33. env
  34. echo "==== ===="
  35.  
  36. #####
  37. # PREPARE SOURCES
  38. #####
  39. echo "==== Preparing sources ====="
  40. [[ -d /tmp/guix ]] || git clone --recurse https://git.savannah.gnu.org/git/guix.git /tmp/guix
  41. cd /tmp/guix
  42. rm -rf autom4te.cache/
  43. make clean || true &> /dev/null
  44. make clean-go || true &> /dev/null
  45. ./bootstrap
  46. ./configure --prefix=${prefix_install} --with-store-dir=${prefix_install}/gnu/store
  47. echo "==== ===="
  48.  
  49. ####
  50. # BUILDING
  51. ####
  52. echo "Building....."
  53. make -j 4
  54. make check
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement