GNU Guix

Package manager,
system distribution
and more…

Dependable

Flexible

General Purpose

Dependable

The immutable store is a rock solid base to build on

Package behaviour can be fixed at build time

You can rollback changes

Flexible

Use prebuilt packages, or build from source

Tweak package definitions, and add your own

No conflicts between different packages

General purpose

Advancement through diversity

No barriers of programming language or field of use

Leverage Guix wherever you need it

Works on multiple distributions and architectures

$ guix package --install hello
          
$ hello
Hello, world!
          
 
Modified, © Ricardo Wurmus
guix package -r bowtie
Modified, © Ricardo Wurmus
guix package --roll-back
Modified, © Ricardo Wurmus

Development environment for hello


$ guix environment hello
$ type -p gcc
/gnu/store/32812c4rxsprnyifhbv21pd6d796r1w8-profile/bin/gcc
guix environment --ad-hoc hello guile

/gnu/store/5w8jk6p57l5an1d39lngw560r2bw2dx1-profile/bin
├── guild -> /gnu/store/yih…6fk-guile-2.2.2/bin/guild
├── guile -> /gnu/store/yih…6fk-guile-2.2.2/bin/guile
├── guile-config -> /gnu/store/yih…6fk-guile-2.2.2/bin/guile-config
├── guile-snarf -> /gnu/store/yih…6fk-guile-2.2.2/bin/guile-snarf
├── guile-tools -> /gnu/store/yih…6fk-guile-2.2.2/bin/guile-tools
└── hello -> /gnu/store/wf6…2sx-hello-2.10/bin/hello

Recap

Install to your users profile:

$ guix package -i ...

Enter a development environment:

$ guix environment ...

Enter a environment with specific packages:

$ guix environment --ad-hoc ...

$ guix environment --container --ad-hoc hello
          

$ echo /gnu/store/*
/gnu/store/…-ncurses-6.0      /gnu/store/…-profile
/gnu/store/…-manual-database  /gnu/store/…-gcc-5.4.0-lib
/gnu/store/…-info-dir         /gnu/store/…-bash-4.4.12
/gnu/store/…-readline-7.0     /gnu/store/…-glibc-2.25
/gnu/store/…-hello-2.10       /gnu/store/…-bash-static-4.4.12
guix graph --type=references hello
$ ldd /gnu/store/wf65hjwqwpz4wllasn63zysi5irql2sx-hello-2.10/bin/hello

linux-vdso.so.1 (0x00007ffece166000)
libgcc_s.so.1 => /gnu/store/3x53yv4v144c9xp02rs64z7j597kkqax-gcc-5.4.0-lib/lib/libgcc_s.so.1 (0x00007fee83076000)
libc.so.6 => /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/libc.so.6 (0x00007fee82cd7000)
/gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/ld-linux-x86-64.so.2 (0x00007fee8328d000)
guix package -i hello --profile=test-profile
          
$ ls -l test-profile*
... test-profile -> test-profile-1-link
... test-profile-1-link ->
      /gnu/store/7pyxcs7yh7xbl3lbjdf5g6z0b4kl7pzf-profile
          

Guix + Direnv



use guix --ad-hoc gcc-toolchain python python-lxml

$ cd /tmp/foo
direnv: loading .envrc
direnv: using guix --ad-hoc gcc-toolchain python python-lxml
direnv: export +PAGER +PYTHONPATH ~CPLUS_INCLUDE_PATH
               ~C_INCLUDE_PATH ~LIBRARY_PATH ~PATH

guix pack

The guix pack command creates a shrink-wrapped pack or software bundle.

$ guix pack guile emacs geiser
...
...
/gnu/store/v5dq15c61k0gb5w8w9psgszd56vnca0v-tarball-pack.tar.gz
$ guix pack -f docker guile emacs geiser
...
...
/gnu/store/mym3ipc9v0ki9y9vijjmyqrsajc1y3sz-docker-pack.tar.gz

Writing a package definition

Importers available for: gnu, nix, pypi, cpan, hackage, stackage, elpa, gem, cran, crate, texlive and json.

Hello package definition

            (define-public hello
  (package
    (name "hello")
    (version "2.10")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/hello/hello-" version
                                  ".tar.gz"))
              (sha256
               (base32
                "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
    (build-system gnu-build-system)
    (synopsis "Hello, GNU world: An example GNU package")
    (description
     "GNU Hello prints the message \"Hello, world!\" and then exits.  It
serves as an example of standard GNU coding practices.  As such, it supports
command-line arguments, multiple languages, and so on.")
    (home-page "https://www.gnu.org/software/hello/")
    (license gpl3+)))
Derivation graph for the hello package

Talk to others on

#guix on freenode

For the manual, mailing lists, papers, blog posts and talks, go to https://gnu.org/s/guix/help