diff options
Diffstat (limited to 'contrib/packages/guix')
-rw-r--r-- | contrib/packages/guix/guix.README | 29 | ||||
-rw-r--r-- | contrib/packages/guix/guix.scm | 51 |
2 files changed, 80 insertions, 0 deletions
diff --git a/contrib/packages/guix/guix.README b/contrib/packages/guix/guix.README new file mode 100644 index 000000000..1e8bd3126 --- /dev/null +++ b/contrib/packages/guix/guix.README | |||
@@ -0,0 +1,29 @@ | |||
1 | guix.scm contains Guix package definitions that can be used to | ||
2 | override the ones found in Guix's GNU distribution. | ||
3 | |||
4 | Guix packagers are encouraged to adopt and adjust these definitions. | ||
5 | |||
6 | GNUnet developers can use this for easily setting up a development or | ||
7 | test environment using Guix. | ||
8 | |||
9 | When using the package definition for building a package this will | ||
10 | pick up the current development code. The version of the resulting | ||
11 | package is the output of 'git describe --tags'. | ||
12 | |||
13 | To make guix build the development package defined here, use the | ||
14 | following command: | ||
15 | |||
16 | guix build -f <gnunet.git>/contrib/guix | ||
17 | |||
18 | To spawn a (development) environment with GNUnet's dependencies | ||
19 | installed, run: | ||
20 | |||
21 | guix environment --load-path=<gnunet.git>/contrib/guix.scm | ||
22 | |||
23 | To spawn a (test) environment with GNUnet available in this | ||
24 | environment, run: | ||
25 | |||
26 | guix environment --load-path=<gnunet.git>/contrib/guix.scm --ad-hoc guix | ||
27 | |||
28 | It is recommended to also pass the '--pure' option to guix, to make | ||
29 | sure the environment is not polluted with existing packages. | ||
diff --git a/contrib/packages/guix/guix.scm b/contrib/packages/guix/guix.scm new file mode 100644 index 000000000..4376d1ef5 --- /dev/null +++ b/contrib/packages/guix/guix.scm | |||
@@ -0,0 +1,51 @@ | |||
1 | ;;; guix.scm -- Guix package definition | ||
2 | |||
3 | (use-modules | ||
4 | (guix git-download) | ||
5 | (guix download) | ||
6 | (guix packages) | ||
7 | (guix utils) | ||
8 | (guix gexp) | ||
9 | (gnu packages) | ||
10 | (gnu packages autotools) | ||
11 | (gnu packages gettext) | ||
12 | (gnu packages gnunet) | ||
13 | (gnu packages image) | ||
14 | (gnu packages texinfo) | ||
15 | (srfi srfi-1) | ||
16 | (ice-9 popen) | ||
17 | (ice-9 rdelim)) | ||
18 | |||
19 | (define %source-dir (dirname (dirname (current-filename)))) | ||
20 | |||
21 | (define %git-commit | ||
22 | (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ))) | ||
23 | |||
24 | (define-public gnunet-git | ||
25 | (package | ||
26 | (inherit gnunet) | ||
27 | (name "gnunet") | ||
28 | (version (git-version (package-version gnunet) "HEAD" %git-commit)) | ||
29 | (source (local-file %source-dir #:recursive? #t)) | ||
30 | (inputs | ||
31 | `(("libjpeg" ,libjpeg) | ||
32 | ,@(package-inputs gnunet))) | ||
33 | (native-inputs | ||
34 | `(("autoconf" ,autoconf) | ||
35 | ("automake" ,automake) | ||
36 | ("gettext" ,gnu-gettext) | ||
37 | ("libtool" ,libtool) | ||
38 | ("texinfo" ,texinfo) | ||
39 | ("which" ,(@ (gnu packages base) which)) | ||
40 | ,@(package-native-inputs gnunet))) | ||
41 | (arguments | ||
42 | (substitute-keyword-arguments (package-arguments gnunet) | ||
43 | ((#:phases phases) | ||
44 | `(modify-phases ,phases | ||
45 | (add-after 'unpack 'make-po-directory-writable | ||
46 | (lambda _ | ||
47 | (for-each make-file-writable | ||
48 | (find-files "po" ".")) | ||
49 | #t)))))))) | ||
50 | |||
51 | gnunet-git | ||