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>
5 ;;; Also borrowing code from:
6 ;;; guile-sdl2 --- FFI bindings for SDL2
7 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
9 ;;; This file is part of 8sync.
10 ;;; However, unlike most of 8sync, which is under the LGPLv3+, this
11 ;;; file in particular is licensed under GPLv3+.
12 ;;; Guix is also licensed under GPLv3+.
14 ;;; This program is free software: you can redistribute it and/or modify
15 ;;; it under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation, either version 3 of the License, or
17 ;;; (at your option) any later version.
19 ;;; This program is distributed in the hope that it will be useful,
20 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
29 ;; GNU Guix development package. To build and install, run:
31 ;; guix package -f guix.scm
33 ;; To build it, but not install it, run:
35 ;; guix build -f guix.scm
37 ;; To use as the basis for a development environment, run:
39 ;; guix environment -l guix.scm
43 (use-modules (srfi srfi-1)
52 (guix build-system gnu)
53 ((guix build utils) #:select (with-directory-excursion))
55 (gnu packages autotools)
57 (gnu packages pkg-config)
58 (gnu packages texinfo))
60 (define %source-dir (dirname (current-filename)))
63 (let* ((pipe (with-directory-excursion %source-dir
64 (open-pipe* OPEN_READ "git" "ls-files")))
65 (files (let loop ((lines '()))
66 (match (read-line pipe)
70 (loop (cons line lines))))))
71 (status (close-pipe pipe)))
73 (match (stat:type stat)
75 ((or 'regular 'symlink)
76 (any (cut string-suffix? <> file) files))
82 (source (local-file %source-dir #:recursive? #t #:select? git-file?))
83 (build-system gnu-build-system)
84 (native-inputs `(("autoconf" ,autoconf)
85 ("automake" ,automake)
87 ("pkg-config" ,pkg-config)
88 ("texinfo" ,texinfo)))
90 `(#:phases (modify-phases %standard-phases
91 (add-before 'configure 'bootstrap
93 (zero? (system* "./bootstrap.sh"))))
94 (add-before 'configure 'setenv
96 (setenv "GUILE_AUTO_COMPILE" "0"))))))
97 (home-page "https://gnu.org/s/8sync/")
98 (synopsis "Asynchronous actor model library for Guile")
100 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
101 library for GNU Guile based on the actor model.")