summaryrefslogtreecommitdiff
path: root/contrib/packages/guix/README
blob: 9062cdb687fae9af6d11a061bdc0ef77294449d9 (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
54
55
56
57
58
59
60
61
62
63
64
package definitions for GNU Guix
---------------------------------

About
-----

This directory contains various files to work with GNUnet using Guix:

* A folder intended to be used with GUIX_PACKAGE_PATH ("packages")
* gnunet-doc.scm: A file to ease the building of the docgen script output
* gnunet.scm: A file to build gnunet with all tests
* guix-env.scm

The workflow has to be documented and will make its way into the GNUnet
Documentation eventually. For now, all uses of guix environment, guix package,
etc apply.
Example invocation:
  guix environment --ad-hoc --container --network --fallback -K -l contrib/packages/guix/gnunet.scm
which is worth improving, but essentially takes you into an container environment
with gnunet from HEAD, under the condition that it builds. This won't include an editor,
so you want to run
  guix environment --ad-hoc emacs --container --network --fallback -K -l contrib/packages/guix/gnunet.scm
(untested). You get the idea that this folder is a historical mess and should be cleaned up
and properly documented.

Usage
-----

Just point Guix towards the root of this source tree.
Assuming that your gnunet checkout is in $HOME/src/gnunet:

  export GUIX_PACKAGE_PATH=$HOME/src/gnunet/contrib/packages/guix/packages

or (if you are in the root of the gnunet git repository):

  guix package -L contrib/packages/guix/packages -i package-name

The packages in this repository will take precedence over those in the
official distribution.


To make use of the packages in your GuixSD config file:

Be sure to have GUIX_PACKAGE_PATH for your shell exported,
for Bash this could be achieved like this:

  export GUIX_PACKAGE_PATH="/full/path/to/gnunet/contrib/packages/guix/directory"

In the section of your systems "config.scm", you should find something like this:

  (use-modules (gnu) (gnu system nss))

Now to make use of "gnunetg" as an systemwide installed package we change this
to:

  (use-modules (gnu) (gnu system nss)
               (gnunet packages gnunet))

and do the usual thing:
 - save
 - guix system build /etc/config.scm
 - sudo -E guix system reconfigure /etc/config.scm

The "-E" in "sudo -E" is important to keep the environment variables (GUIX_PACKAGE_PATH).