From 0d20fa698188b66ad4ee107e987ec4dff83cbfd1 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 23 Oct 2017 23:01:40 +0100 Subject: Presentation for Freenode live 2017 --- index.html | 1763 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1717 insertions(+), 46 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 98accc3..62e4755 100644 --- a/index.html +++ b/index.html @@ -1,49 +1,1720 @@ - - - - - reveal.js - - - - - - - - - - - -
-
-
Slide 1
-
Slide 2
-
-
- - - - - - + + + + + GNU Guix, package manager, system distribution and more + + + + + + + + + + + + +
+
+
+ +

GNU Guix

+

Package manager,
system distribution
and more…

+ +
+ +
+

+ Guix... +

+

+ Why another package management tool? +

+ + +
+ +
+

User
Control / Freedom

+ + +
+ +
+

How does Guix work?

+ + +
+ +
+ +
+
+
+
+

1993

+ First Debian release + +
+
+ +
+
+
+

2004

Nix: A Safe and Policy-Free System for + Software Deployment +
+
+ +
+
+
+

2012

+ Guix announced +
+
+
+ +
+
+
+

2017

+ freenode #live +
+
+ + +
+ +
+ + + + + +
+ +
+

The store

+ +
/gnu/store/wf65hjwqwpz4wllasn63zysi5irql2sx-hello-2.10
+├── bin
+│   └── hello
+└── share
+    ├── info
+    │   └── ...
+    ├── locale
+    │   └── ...
+    └── man
+        └── ...
+
+ + +
+ +
+ +
$ guix build --derivations hello
+/gnu/store/1drc59xkcvgdphzgylxm41ln9p5dwbgn-hello-2.10.drv
+
+ + +
Derive(
+  [("out","/gnu/store/wf65hjwqwpz4wllasn63zysi5irql2sx-hello-2.10","","")],
+  [("/gnu/store/0gabs9i1zawd406rkkr7l15ifg61s34r-glibc-2.25.drv",["out"]),
+   ("/gnu/store/1lqw4mz8xzjhnb65kc1nvk8wg39spv5j-hello-2.10.tar.gz.drv",["out"]),
+   ("/gnu/store/1vmhamqwgs3qa7rw28am5rm3b9fjs163-file-5.30.drv",["out"]),
+   ("/gnu/store/23h9fzinl5j1s5x7r2i155f1m7ify9wl-ld-wrapper-0.drv",["out"]),
+   ("/gnu/store/3li1y3cc8rkr4d0q9h8bkvl4h3macnf6-bash-minimal-4.4.12.drv",["out"]),
+   ("/gnu/store/6y5h0pbqci67ql1ij5crkchjzmxkafbv-gawk-4.1.4.drv",["out"]),
+   ("/gnu/store/8xmbpyfnh5cdrk9fmx8j67894bq9vl1r-module-import.drv",["out"]),
+   ("/gnu/store/9sahk6fh2p5k631rxl6amx0cd4z8jn0s-diffutils-3.6.drv",["out"]),
+   ("/gnu/store/cm2f8yxfpy353kxbq5gl7whzvmkl9niv-make-4.2.1.drv",["out"]),
+   ("/gnu/store/fqx5lcb8lhdxkw1dwcgahnqaxgaycgb1-tar-1.29.drv",["out"]),
+   ("/gnu/store/i5fzg4cq88yvl2i7bsnqprzgq494bpdm-patch-2.7.5.drv",["out"]),
+   ("/gnu/store/iwzysdzl3yphqa0c0km8liiimcsrxmvd-glibc-utf8-locales-2.25.drv",["out"]),
+   ("/gnu/store/jwsvpyyxkmyg0wk3cic3b9q9wgimphkz-findutils-4.6.0.drv",["out"]),
+   ("/gnu/store/m5kd44n51ns8zlc8mvii497xc2siydpb-coreutils-8.27.drv",["out"]),
+   ("/gnu/store/pjgbs80jhzpm7lfpsa5dp6jgxkcv6n56-bzip2-1.0.6.drv",["out"]),
+   ("/gnu/store/qgcr4gp3qz098yh6zsnn97dg4h8d2nbn-sed-4.4.drv",["out"]),
+   ("/gnu/store/r49cqbngzhn8q1qr6cjsm4vs85vwzl9i-xz-5.2.2.drv",["out"]),
+   ("/gnu/store/rkjydj936a096s70bxq7sz77bbxzfqvd-gzip-1.8.drv",["out"]),
+   ("/gnu/store/vk9xdybvknvnnaxavdk2q43yvdq5h47r-binutils-2.28.drv",["out"]),
+   ("/gnu/store/wrlssahrl79njwzwv8clcq8vdh2syppx-module-import-compiled.drv",["out"]),
+   ("/gnu/store/xz5ikvwa6pyz11h0a5hmzf9rxyi5xjzw-guile-2.2.2.drv",["out"]),
+   ("/gnu/store/zb0wzrfgiydmr8gbxywyrmg6yp68w4fj-linux-libre-headers-4.4.47.drv",["out"]),
+   ("/gnu/store/zxiy6cnd05p90hmyk1mvr30lm17ghwim-grep-3.0.drv",["out"]),
+   ("/gnu/store/zxkwsk4g0m7j2p54l7xp2gblb6v4zddf-gcc-5.4.0.drv",["out"])],
+  ["/gnu/store/hqlhinp4gsfym9l5bq63c7g8y1j14ynz-hello-2.10-guile-builder"],
+   "x86_64-linux",
+   "/gnu/store/d8gkn84yqacjr80pzicz1ka3y2s1f2x0-guile-2.2.2/bin/guile",
+  ["--no-auto-compile",
+   "-L",
+   "/gnu/store/xhwmxry8kkmq7897558qmcmfsx8r1z45-module-import",
+   "/gnu/store/hqlhinp4gsfym9l5bq63c7g8y1j14ynz-hello-2.10-guile-builder"],
+  [("GUILE_LOAD_COMPILED_PATH","/gnu/store/r7sf4w2wwrbxbcf04pi9a5gkdhzaya2g-module-import-compiled"),
+   ("out","/gnu/store/wf65hjwqwpz4wllasn63zysi5irql2sx-hello-2.10")]
+)
+
+ + +
+ +
+
$ guix build --derivations hello
+/gnu/store/1drc59xkcvgdphzgylxm41ln9p5dwbgn-hello-2.10.drv
+ +
Derive(
+  [("out","","","")],
+  [("/gnu/store/0gabs9i1zawd406rkkr7l15ifg61s34r-glibc-2.25.drv",["out"]),
+   ("/gnu/store/1lqw4mz8xzjhnb65kc1nvk8wg39spv5j-hello-2.10.tar.gz.drv",["out"]),
+   ("/gnu/store/1vmhamqwgs3qa7rw28am5rm3b9fjs163-file-5.30.drv",["out"]),
+   ("/gnu/store/23h9fzinl5j1s5x7r2i155f1m7ify9wl-ld-wrapper-0.drv",["out"]),
+   ("/gnu/store/3li1y3cc8rkr4d0q9h8bkvl4h3macnf6-bash-minimal-4.4.12.drv",["out"]),
+   ("/gnu/store/6y5h0pbqci67ql1ij5crkchjzmxkafbv-gawk-4.1.4.drv",["out"]),
+   ("/gnu/store/8xmbpyfnh5cdrk9fmx8j67894bq9vl1r-module-import.drv",["out"]),
+   ("/gnu/store/9sahk6fh2p5k631rxl6amx0cd4z8jn0s-diffutils-3.6.drv",["out"]),
+   ("/gnu/store/cm2f8yxfpy353kxbq5gl7whzvmkl9niv-make-4.2.1.drv",["out"]),
+   ("/gnu/store/fqx5lcb8lhdxkw1dwcgahnqaxgaycgb1-tar-1.29.drv",["out"]),
+   ("/gnu/store/i5fzg4cq88yvl2i7bsnqprzgq494bpdm-patch-2.7.5.drv",["out"]),
+   ("/gnu/store/iwzysdzl3yphqa0c0km8liiimcsrxmvd-glibc-utf8-locales-2.25.drv",["out"]),
+   ("/gnu/store/jwsvpyyxkmyg0wk3cic3b9q9wgimphkz-findutils-4.6.0.drv",["out"]),
+   ("/gnu/store/m5kd44n51ns8zlc8mvii497xc2siydpb-coreutils-8.27.drv",["out"]),
+   ("/gnu/store/pjgbs80jhzpm7lfpsa5dp6jgxkcv6n56-bzip2-1.0.6.drv",["out"]),
+   ("/gnu/store/qgcr4gp3qz098yh6zsnn97dg4h8d2nbn-sed-4.4.drv",["out"]),
+   ("/gnu/store/r49cqbngzhn8q1qr6cjsm4vs85vwzl9i-xz-5.2.2.drv",["out"]),
+   ("/gnu/store/rkjydj936a096s70bxq7sz77bbxzfqvd-gzip-1.8.drv",["out"]),
+   ("/gnu/store/vk9xdybvknvnnaxavdk2q43yvdq5h47r-binutils-2.28.drv",["out"]),
+   ("/gnu/store/wrlssahrl79njwzwv8clcq8vdh2syppx-module-import-compiled.drv",["out"]),
+   ("/gnu/store/xz5ikvwa6pyz11h0a5hmzf9rxyi5xjzw-guile-2.2.2.drv",["out"]),
+   ("/gnu/store/zb0wzrfgiydmr8gbxywyrmg6yp68w4fj-linux-libre-headers-4.4.47.drv",["out"]),
+   ("/gnu/store/zxiy6cnd05p90hmyk1mvr30lm17ghwim-grep-3.0.drv",["out"]),
+   ("/gnu/store/zxkwsk4g0m7j2p54l7xp2gblb6v4zddf-gcc-5.4.0.drv",["out"])],
+  ["/gnu/store/hqlhinp4gsfym9l5bq63c7g8y1j14ynz-hello-2.10-guile-builder"],
+   "x86_64-linux",
+   "/gnu/store/d8gkn84yqacjr80pzicz1ka3y2s1f2x0-guile-2.2.2/bin/guile",
+  ["--no-auto-compile",
+   "-L",
+   "/gnu/store/xhwmxry8kkmq7897558qmcmfsx8r1z45-module-import",
+   "/gnu/store/hqlhinp4gsfym9l5bq63c7g8y1j14ynz-hello-2.10-guile-builder"],
+  [("GUILE_LOAD_COMPILED_PATH","/gnu/store/r7sf4w2wwrbxbcf04pi9a5gkdhzaya2g-module-import-compiled"),
+   ("out","")]
+)
+ + +
+ +
+
$ guix build --derivations hello
+/gnu/store/1drc59xkcvgdphzgylxm41ln9p5dwbgn-hello-2.10.drv
+ +
Derive(
+  [("out","","","")],
+  [("04fb79c7338393b15562c5ffd222b40fb745683896789ad2b37659ac9d597540",["out"]),
+   ("08a81b5317696b0ac342330b4561409db5db8273fee477c26cd2854499e4be1c",["out"]),
+   ("0fcc386963a58070aacfc0cfb4fa5e67e676b25b6b038ed1aa61f12b933a39c3",["out"]),
+   ("1b6c42938b2a02480294d8e89bf9fe94c77f392fd41f7cdb72b4c85071b3d197",["out"]),
+   ("1e8dc40cc0593bae81806df0a1785582fb94ee07802b095ad521e7cb0dd16c41",["out"]),
+   ("2e25667c193bed7410ca1f675ba717d5aec59123392d14b35d0918287de2fdf4",["out"]),
+   ("3266b64f962b87ed7bb437ddd49c33a20d439e049a3829e2c10f5c2d8ae7d294",["out"]),
+   ("39ea9f7baeee4ba446ebbaed88b5354adc088dae479e73a2825471c07088a86c",["out"]),
+   ("522962e0ca0c7a5682ee561e618c9e08ce841d24468125c203e935ecd0e8da37",["out"]),
+   ("523610101af5dc2481bdce53a050d680bbc516c64baf32463cf95ab3b18aa261",["out"]),
+   ("5d7766754e92a0a96ca3b732ae0d9e3da892994961cee1500d7c689a0ddcb785",["out"]),
+   ("61fd1308247835184ffe88140f9025117edb3210c47d617feafa33572ad8b8e3",["out"]),
+   ("6ae6f3630665d92a495a4edb0f337fe1884fff9e6adcef65cf1c79131071d127",["out"]),
+   ("7b8ef27665067602e4e27e801c6e8f385bd83b378037a60a4f5953a02b12c74f",["out"]),
+   ("81c2221261670003975a89df35fba774c3871f4444c0d3a1eef6ef21e7aba678",["out"]),
+   ("875b4153b80df041b31b6d0fb93b4bb8b62fbd3938320a8ce6ff263d01b3a536",["out"]),
+   ("89e81aee370115bec522ad48de0f59030f227fe8a599bb409352a34e710669f8",["out"]),
+   ("a127853978c101a2b52071108ed48834435c0bbaf1b707c13304ef9d8e70c3a6",["out"]),
+   ("ab4bf18925deebcc80259b45cba39b348320a03f61d93e2246dcd6f5d28a1b68",["out"]),
+   ("afe40de343b27326b5e6089c8adf8fdbdb105dcc35f671025c87de0bba965184",["out"]),
+   ("bc726d150b4ba6aa8624eba59ad092d729705de4f0148391d33dac15a8aa5dbf",["out"]),
+   ("bfb16f9021e341594cfce1c772ccd491599694460ac1df24a8bb77fadc2a4a04",["out"]),
+   ("e226a8e968c6132524948d4fd0483a16603b57bddc92f97d6ce31580889754c2",["out"]),
+   ("f662215314a37fcf8ae79e425bd197b3a3351bd8ff3d90506cc069c83c833b6d",["out"])],
+  ["/gnu/store/hqlhinp4gsfym9l5bq63c7g8y1j14ynz-hello-2.10-guile-builder"],
+   "x86_64-linux",
+   "/gnu/store/d8gkn84yqacjr80pzicz1ka3y2s1f2x0-guile-2.2.2/bin/guile",
+  ["--no-auto-compile",
+   "-L",
+   "/gnu/store/xhwmxry8kkmq7897558qmcmfsx8r1z45-module-import",
+   "/gnu/store/hqlhinp4gsfym9l5bq63c7g8y1j14ynz-hello-2.10-guile-builder"],
+  [("GUILE_LOAD_COMPILED_PATH","/gnu/store/r7sf4w2wwrbxbcf04pi9a5gkdhzaya2g-module-import-compiled"),
+   ("out","")]
+)
+ + + +
+ +
+ +
$ guix build --derivations hello
+/gnu/store/1drc59xkcvgdphzgylxm41ln9p5dwbgn-hello-2.10.drv
+
+ + +
Derive(
+  [("out","/gnu/store/wf65hjwqwpz4wllasn63zysi5irql2sx-hello-2.10","","")],
+  [("/gnu/store/0gabs9i1zawd406rkkr7l15ifg61s34r-glibc-2.25.drv",["out"]),
+   ("/gnu/store/1lqw4mz8xzjhnb65kc1nvk8wg39spv5j-hello-2.10.tar.gz.drv",["out"]),
+   ("/gnu/store/1vmhamqwgs3qa7rw28am5rm3b9fjs163-file-5.30.drv",["out"]),
+   ("/gnu/store/23h9fzinl5j1s5x7r2i155f1m7ify9wl-ld-wrapper-0.drv",["out"]),
+   ("/gnu/store/3li1y3cc8rkr4d0q9h8bkvl4h3macnf6-bash-minimal-4.4.12.drv",["out"]),
+   ("/gnu/store/6y5h0pbqci67ql1ij5crkchjzmxkafbv-gawk-4.1.4.drv",["out"]),
+   ("/gnu/store/8xmbpyfnh5cdrk9fmx8j67894bq9vl1r-module-import.drv",["out"]),
+   ("/gnu/store/9sahk6fh2p5k631rxl6amx0cd4z8jn0s-diffutils-3.6.drv",["out"]),
+   ("/gnu/store/cm2f8yxfpy353kxbq5gl7whzvmkl9niv-make-4.2.1.drv",["out"]),
+   ("/gnu/store/fqx5lcb8lhdxkw1dwcgahnqaxgaycgb1-tar-1.29.drv",["out"]),
+   ("/gnu/store/i5fzg4cq88yvl2i7bsnqprzgq494bpdm-patch-2.7.5.drv",["out"]),
+   ("/gnu/store/iwzysdzl3yphqa0c0km8liiimcsrxmvd-glibc-utf8-locales-2.25.drv",["out"]),
+   ("/gnu/store/jwsvpyyxkmyg0wk3cic3b9q9wgimphkz-findutils-4.6.0.drv",["out"]),
+   ("/gnu/store/m5kd44n51ns8zlc8mvii497xc2siydpb-coreutils-8.27.drv",["out"]),
+   ("/gnu/store/pjgbs80jhzpm7lfpsa5dp6jgxkcv6n56-bzip2-1.0.6.drv",["out"]),
+   ("/gnu/store/qgcr4gp3qz098yh6zsnn97dg4h8d2nbn-sed-4.4.drv",["out"]),
+   ("/gnu/store/r49cqbngzhn8q1qr6cjsm4vs85vwzl9i-xz-5.2.2.drv",["out"]),
+   ("/gnu/store/rkjydj936a096s70bxq7sz77bbxzfqvd-gzip-1.8.drv",["out"]),
+   ("/gnu/store/vk9xdybvknvnnaxavdk2q43yvdq5h47r-binutils-2.28.drv",["out"]),
+   ("/gnu/store/wrlssahrl79njwzwv8clcq8vdh2syppx-module-import-compiled.drv",["out"]),
+   ("/gnu/store/xz5ikvwa6pyz11h0a5hmzf9rxyi5xjzw-guile-2.2.2.drv",["out"]),
+   ("/gnu/store/zb0wzrfgiydmr8gbxywyrmg6yp68w4fj-linux-libre-headers-4.4.47.drv",["out"]),
+   ("/gnu/store/zxiy6cnd05p90hmyk1mvr30lm17ghwim-grep-3.0.drv",["out"]),
+   ("/gnu/store/zxkwsk4g0m7j2p54l7xp2gblb6v4zddf-gcc-5.4.0.drv",["out"])],
+  ["/gnu/store/hqlhinp4gsfym9l5bq63c7g8y1j14ynz-hello-2.10-guile-builder"],
+   "x86_64-linux",
+   "/gnu/store/d8gkn84yqacjr80pzicz1ka3y2s1f2x0-guile-2.2.2/bin/guile",
+  ["--no-auto-compile",
+   "-L",
+   "/gnu/store/xhwmxry8kkmq7897558qmcmfsx8r1z45-module-import",
+   "/gnu/store/hqlhinp4gsfym9l5bq63c7g8y1j14ynz-hello-2.10-guile-builder"],
+  [("GUILE_LOAD_COMPILED_PATH","/gnu/store/r7sf4w2wwrbxbcf04pi9a5gkdhzaya2g-module-import-compiled"),
+   ("out","/gnu/store/wf65hjwqwpz4wllasn63zysi5irql2sx-hello-2.10")]
+)
+
+ + +
+ +
+

Fixed-output derivation

+
$ guix build -S -d hello
+/gnu/store/1lqw4mz8xzjhnb65kc1nvk8wg39spv5j-hello-2.10.tar.gz.drv
+ +
Derive(
+  [("out",
+    "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz",
+    "sha256",
+    "31e066137a962676e89f69d1b65382de95a7ef7d914b8cb956f41ea72e0f516b")],
+  [],
+  ["/gnu/store/qivc6nybj6mxa95h7h10hg7qv81rdfcm-mirrors",
+   "/gnu/store/wvbspgpk15aq6kcf2f67xjai1fbkbyqc-content-addressed-mirrors"],
+  "x86_64-linux",
+  "builtin:download",
+  [],
+  [("content-addressed-mirrors","/gnu/store/wvbspgpk15aq6kcf2f67xjai1fbkbyqc-content-addressed-mirrors"),
+   ("impureEnvVars","http_proxy https_proxy LC_ALL LC_MESSAGES LANG COLUMNS"),
+   ("mirrors","/gnu/store/qivc6nybj6mxa95h7h10hg7qv81rdfcm-mirrors"),
+   ("out","/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"),
+   ("preferLocalBuild","1"),
+   ("url","\"mirror://gnu/hello/hello-2.10.tar.gz\"")]
+)
+ + +
+ +
+ + + Derivation graph for the hello package + + + +
+ +
+

The hello package

+ +
+            (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+)))
+ + +
+ +
+

What can you do with Guix?

+ + +
+ +
+

Install a package in to your profile

+ + + guix package -i hello + + + +
+ +
+

Upgrade the packages in your profile

+ + + guix package -u + + + +
+ +
+

Roll back to the previous generation of your profile

+ + + guix package --roll-back + + + +
+ +
+
guix package -i samtools bowtie
+ + + Modified, © Ricardo Wurmus + + + +
+ +
+
guix package -r bowtie
+ + + Modified, © Ricardo Wurmus + + + +
+ +
+
guix package --roll-back
+ + + Modified, © Ricardo Wurmus + + + +
+ +
+

Wait a minute, what was installed?

+ + +
+ +
+ + guix package -i hello + + + + +
+ +
+ +guix environment hello + + + +
+ +
+ + 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
+ + +
+ +
+ + guix environment --pure --ad-hoc hello + + + +
+ +
+ + 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
+ + +
+ +
+ + + Graph of the hello package references + + +
+ +
+
$ 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 + 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
+
+ + +
+ +
+

Managing systems and services with Guix

+ + +
+ +
+

Systems

+ +
(use-modules (gnu))
+(use-service-modules networking ssh)
+(use-package-modules screen ssh)
+
+(operating-system
+  (host-name "komputilo")
+  (timezone "Europe/Berlin")
+  (locale "en_US.utf8")
+
+  (bootloader (bootloader-configuration
+                (bootloader grub-bootloader)
+                (target "/dev/sdX")))
+  (file-systems (cons (file-system
+                        (device "my-root")
+                        (title 'label)
+                        (mount-point "/")
+                        (type "ext4"))
+                      %base-file-systems))
+
+  (users (cons (user-account
+                (name "alice")
+                (comment "Bob's sister")
+                (group "users")
+                (supplementary-groups '("wheel"
+                                        "audio" "video"))
+                (home-directory "/home/alice"))
+               %base-user-accounts))
+
+  (packages (cons* screen openssh %base-packages))
+
+  (services (cons* (dhcp-client-service)
+                   (service openssh-service-type
+                            (openssh-configuration
+                              (port-number 2222)))
+              %base-services)))
+ + +
+ +
+

Services

+ +
...
+
+  (services (cons* (dhcp-client-service)
+                   (service openssh-service-type
+                            (openssh-configuration
+                              (port-number 2222)))
+                   %base-services)))
+ + + +
+ +
+ + Extension graph + + +
+ +
+ + Shepherd graph + + +
+ +
+

+ Extending Guix +

+ + +
+ +
+

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+)))
+ + +
+ +
+

Inheritance

+ +
(define-public ruby-2.3
+  (package
+    (inherit ruby)
+    (version "2.3.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
+                           (version-major+minor version)
+                           "/ruby-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1npzcnq5kh0f9y88w5gj4v6ln8csr91361k3r43dmhlhn6mpsfkx"))
+       (modules '((guix build utils)))
+       (snippet `(begin
+                   ;; Remove bundled libffi
+                   (delete-file-recursively "ext/fiddle/libffi-3.2.1")
+                   #t))))))
+ + +
+ +
+

G-expressions, a way of staging code

+ +
(define build-exp
+  #~(begin
+      (mkdir #$output)
+      (chdir #$output)
+      (symlink (string-append #$coreutils "/bin/ls")
+               "list-files")))
+ + +
+ +
+

What is Guix?

+ + + Standalone package definitions
+ bootstrap binaries +


+ Package management tool + library

+ + GNU+Linux distribution, with declarative
configuration for + the system and services +


+ + + Build packages from source, offload build tasks to other + machines, copy store items to other machines, graph + packages and systems, inspect the size of store items, + publish substitutes, run the garbage collector, generate + package definitions from various sources, update package + definitions for new releases, build raw or ISO disk + images... + + + + +
+ +
+

Use Guix!

+ +

+ Install Guix within an existing system. +

+ +

+ Install GuixSD, a distribution of GNU+Linux. +

+ + +
+ +
+

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 + +

+ +
+
+
+ + + + + + -- cgit v1.2.3