blob: 1ca479b71adfc14c6671b688d284a9844c65e1e8 (
plain)
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
|
# Guix profiles for development
## Executive summary
To build guix profiles that can run GN2+GN3 we use a so-called channel.
Note that a recently tested channel can be fetched from cd.genenetwork.org. That should include the recent git hash values.
=> https://ci.genenetwork.org/channels.scm
Alternatively put the following into a channels.scm file.
```
(list (channel
(name 'gn-bioinformatics)
(url "https://gitlab.com/genenetwork/guix-bioinformatics")
;; (url "https://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics")
(branch "master")))
```
Build a profile using
```
$ guix pull -C channels.scm -p ~/.guix-extra-profiles/genenetwork
```
Activate the newly built profile using
```
$ export GUIX_PROFILE=~/.guix-extra-profiles/genenetwork
$ . $GUIX_PROFILE/etc/profile
```
Hack away on any GeneNetwork repository as usual. Now, any development environment you create with `guix shell` will be identical to what others on the team and the continuous integration system are using. This development environment is guaranteed to not break regardless of the latest changes to Guix upstream or other externalities.
## Production (tux01)
After downloading channels.scm from
=> https://ci.genenetwork.org/channels.scm
On production we do
```
tux01:~$ ~/opt/guix-pull/bin/guix pull -C channels.scm -p /usr/local/guix-profiles/gn-latest-20220928
```
## Rationale
From time to time, updates to upstream Guix break our guix-bioinformatics channel. As a result, `guix pull` breaks and our work comes to a standstill for a few days until this can be fixed. While it is important to gradually move towards the latest and greatest, we would like to avoid being at the mercy of externalities and would prefer to update in a more controlled way without interrupting everyone's work.
To this end, we hard-code the guix-bioinformatics channel to depend on a specific commit of upstream Guix. This is why the recommended channels.scm file above does not include a %default-guix-channel. However, this comes with the drawback that your entire system will be stuck at that specific commit of upstream Guix. You will not be able to move forward until we decide to update the hard-coded upstream Guix commit in guix-bioinformatics. You may have other work that needs the latest Guix and this might not be what you want. So, we highly recommend using a separate `guix pull` profile specifically for GeneNetwork work, as described above.
This scheme also comes with the added bonus that all members on the team and the continuous integration system will be using exactly the same Guix.
## Notes
We recently had to switch to gitlab because our git server went down on Penguin2.
|