actors: Reflect removal of choice of whether to cleanup in self-destruct
[8sync.git] / guix.scm
1 ;;; 8sync --- Asynchronous programming for Guile
2 ;;; Copyright (C) 2016 Jan Nieuwenhuizen <janneke@gnu.org>
3 ;;; Copyright (C) 2017 Christopher Allan Webber <cwebber@dustycloud.org>
4 ;;;
5 ;;; This file is part of 8sync.
6 ;;; However, unlike most of 8sync, which is under the LGPLv3+, this
7 ;;; file in particular is licensed under GPLv3+.
8 ;;; Guix is also licensed under GPLv3+.
9 ;;;
10 ;;; This program is free software: you can redistribute it and/or modify
11 ;;; it under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation, either version 3 of the License, or
13 ;;; (at your option) any later version.
14 ;;;
15 ;;; This program is distributed in the hope that it will be useful,
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 ;;; GNU General Public License for more details.
19 ;;; 
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23 ;;; Commentary:
24 ;;
25 ;; GNU Guix development package.  To build and install, run:
26 ;;
27 ;;   guix package -f guix.scm
28 ;;
29 ;; To build it, but not install it, run:
30 ;;
31 ;;   guix build -f guix.scm
32 ;;
33 ;; To use as the basis for a development environment, run:
34 ;;
35 ;;   guix environment -l guix.scm
36 ;;
37 ;;; Code:
38
39 (use-modules (srfi srfi-1)
40              (srfi srfi-26)
41              (ice-9 popen)
42              (ice-9 match)
43              (ice-9 rdelim)
44              (guix packages)
45              (guix licenses)
46              (guix gexp)
47              (guix git-download)
48              (guix build-system gnu)
49              ((guix build utils) #:select (with-directory-excursion))
50              (gnu packages)
51              (gnu packages autotools)
52              (gnu packages gettext)
53              (gnu packages guile)
54              (gnu packages pkg-config)
55              (gnu packages texinfo))
56
57 (define %source-dir (dirname (current-filename)))
58
59 (define guile-fibers-git
60   (package
61     (inherit guile-fibers)
62     (name "guile-fibers")
63     (version "git")
64     (source (origin
65               (method git-fetch)
66               (uri (git-reference
67                     (url "https://github.com/wingo/fibers.git")
68                     (commit "0fa1fd6adf9980229a46956503a6bf36e8154a78")))
69               (sha256
70                (base32
71                 "0a782aa0v2d115427h1h57jkxy04axklan60dzgnsry4axw9iq8r"))))
72     (arguments
73      `(#:phases (modify-phases %standard-phases
74                   (add-before 'configure 'bootstrap
75                     (lambda _
76                       (zero? (system* "./autogen.sh"))))
77                   (add-before 'configure 'setenv
78                     (lambda _
79                       (setenv "GUILE_AUTO_COMPILE" "0"))))
80        ;; We wouldn't want this in the upstream fibers package, but gosh
81        ;; running tests takes forever and is painful
82        #:tests? #f))
83     (native-inputs
84      `(("autoconf" ,autoconf)
85        ("automake" ,automake)
86        ("libtool" ,libtool)
87        ("texinfo" ,texinfo)
88        ("gettext" ,gettext-minimal)
89        ,@(package-native-inputs guile-2.2)))))
90
91 (package
92   (name "guile-8sync")
93   (version "git")
94   (source (local-file %source-dir
95                       #:recursive? #t
96                       #:select? (git-predicate %source-dir)))
97   (build-system gnu-build-system)
98   (native-inputs `(("autoconf" ,autoconf)
99                    ("automake" ,automake)
100                    ("guile" ,guile-2.2)
101                    ("pkg-config" ,pkg-config)
102                    ("texinfo" ,texinfo)))
103   (propagated-inputs `(("guile-fibers" ,guile-fibers-git)))
104   (arguments
105    `(#:phases (modify-phases %standard-phases
106                 (add-before 'configure 'bootstrap
107                             (lambda _
108                               (zero? (system* "./bootstrap.sh"))))
109                 (add-before 'configure 'setenv
110                             (lambda _
111                               (setenv "GUILE_AUTO_COMPILE" "0"))))))
112   (home-page "https://gnu.org/s/8sync/")
113   (synopsis "Asynchronous actor model library for Guile")
114   (description
115    "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
116 library for GNU Guile based on the actor model.")
117   (license lgpl3+))