1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
| | # -*- mode:org -*-
* 01
guix search dynamically-typed programming language
guix show python
* 02
which python3
python3
guix install python
guix package --search-paths
which python3
GUIX_PROFILE=/home/alice/.guix-profile
. $GUIX_PROFILE/etc/profile
which python3
python3
>> import this
* 03
guix insall python-ipython python-numpy
guix package --search-paths
which python3
python3
import numpy as np
x = np.linspace(0,1,20)
which ipython
ipython
import numpy as np
x = np.linspace(0,1,20)
* 04
which ipython
guix remove python-ipython
which ipython
ipython
* 05
guix install python-matplotlib python-scipy
guix package --search-paths
python3 plot.py
* 06
env | grep ^PATH
GUIX_PROFILE=$HOME/.guix-profile
cat $GUIX_PROFILE/etc/profile
guix package --search-paths
guix package --search-paths=prefix
guix package --search-paths=suffix
. GUIX_PROFILE/etc/profile # == eval $(guix package --search-paths=prefix)
clear
ls $GUIX_PROFILE
guix install tree
clear
tree -L 1 $GUIX_PROFILE
* 07
guix package --list-generations
CLICK
which tree
guix package --roll-back
which tree
tree
guix package --list-generations
CLICK
which ipython
guix package --switch-generations=2
ipython
guix package --list-generations
guix package --switch-generation=5
ipython
* 08
guix install python-ipython --profile=outils
guix package --search-paths --profile=outils
env | grep ^PATH
eval $(guix package --search-paths=suffix --profile-outils)
env | grep ^PATH
CLICK
which ipython
tree -L 1 outils
ls -l
* 09
ls -d */
cd project-foo && ls
python3 some-fun.py
guix shell --manifest=some-python-pkgs.scm
python3 some-fun.py
^D
guix shell -m some-python-pkgs.scm --pure
ls
cd ../project-bar
^D
guix shell -m some-python-pkgs.scm --container
ls
cd ../project-bar
python3 some-fun.py
^D
guix shell -m some-python-pkgs.scm --container python-ipython
ipython
^D
python3 some-fun.py
|