1 ;;; mudsync --- Live hackable MUDs in 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 program is free software: you can redistribute it and/or modify
10 ;;; it under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation, either version 3 of the License, or
12 ;;; (at your option) any later version.
14 ;;; This program is distributed in the hope that it will be useful,
15 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
24 ;; GNU Guix development package. To build and install, run:
26 ;; guix package -f guix.scm
28 ;; To build it, but not install it, run:
30 ;; guix build -f guix.scm
32 ;; To use as the basis for a development environment, run:
34 ;; guix environment -l guix.scm
38 (use-modules (srfi srfi-1)
48 (guix build-system gnu)
49 ((guix build utils) #:select (with-directory-excursion))
51 (gnu packages autotools)
53 (gnu packages pkg-config)
54 (gnu packages texinfo))
56 (define %source-dir (dirname (current-filename)))
59 (let* ((pipe (with-directory-excursion %source-dir
60 (open-pipe* OPEN_READ "git" "ls-files")))
61 (files (let loop ((lines '()))
62 (match (read-line pipe)
66 (loop (cons line lines))))))
67 (status (close-pipe pipe)))
69 (match (stat:type stat)
71 ((or 'regular 'symlink)
72 (any (cut string-suffix? <> file) files))
75 (define guile-without-select-bug
78 (version (package-version guile-next))
81 (uri (string-append "ftp://alpha.gnu.org/gnu/guile/guile-"
85 "0r9y4hw17dlxahik4zsccfb2f3p2a07wqndfm251bgmam9hln6gi"))
86 (modules '((guix build utils)))
88 ;; Remove the pre-built object files. Instead, build everything
89 ;; from source, at the expense of significantly longer build
90 ;; times (almost 3 hours on a 4-core Intel i5).
91 (snippet '(for-each delete-file
92 (find-files "prebuilt" "\\.go$")))
94 ;; Here's what we're adding
95 (patches (list (string-append %source-dir
96 "/build-aux/patch-guile-fix-live-repl.patch")))))))
99 (name "guile-mudsync")
101 (source (local-file %source-dir #:recursive? #t #:select? git-file?))
102 (build-system gnu-build-system)
103 (native-inputs `(("autoconf" ,autoconf)
104 ("automake" ,automake)
105 ("guile" ,guile-without-select-bug)
106 ("guile-8sync" ,guile-8sync)
107 ("guile-irregex" ,guile-irregex)
108 ("pkg-config" ,pkg-config)
109 ("texinfo" ,texinfo)))
111 `(#:phases (modify-phases %standard-phases
112 (add-before 'configure 'bootstrap
114 (zero? (system* "./bootstrap.sh"))))
115 (add-before 'configure 'setenv
117 (setenv "GUILE_AUTO_COMPILE" "0"))))))
118 (home-page "https://notabug.org/cwebber/mudsync/")
119 (synopsis "Live hackable MUD system")
121 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
122 library for GNU Guile based on the actor model.")