render: scene: Stop allocating matrices when rendering.
[chickadee.git] / guix.scm
CommitLineData
98dc87a0
DT
1;;; Chickadee Game Toolkit
2;;; Copyright © 2016 David Thompson <davet@gnu.org>
3;;;
4;;; Chickadee is free software: you can redistribute it and/or modify it
5;;; under the terms of the GNU General Public License as published by
6;;; the Free Software Foundation, either version 3 of the License, or
7;;; (at your option) any later version.
8;;;
9;;; Chickadee is distributed in the hope that it will be useful, but WITHOUT
10;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11;;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
12;;; License for more details.
13;;;
14;;; You should have received a copy of the GNU General Public License
15;;; along with this program. If not, see
16;;; <http://www.gnu.org/licenses/>.
17
18;;; Commentary:
19;;
20;; Development environment for GNU Guix.
21;;
22;; To setup the development environment, run the following:
23;;
24;; guix environment -l guix.scm
25;; ./bootstrap && ./configure;
26;;
27;; To build the development snapshot, run:
28;;
29;; guix build -f guix.scm
30;;
31;; To install the development snapshot, run:
32;;
33;; guix install -f guix.scm
34;;
35;;; Code:
36
37(use-modules (ice-9 match)
38 (srfi srfi-1)
39 (guix packages)
40 (guix licenses)
98de9282 41 (guix download)
1bc3c115 42 (guix git-download)
98dc87a0
DT
43 (guix build-system gnu)
44 (gnu packages)
45 (gnu packages autotools)
46 (gnu packages pkg-config)
47 (gnu packages texinfo)
48 (gnu packages guile)
49 (gnu packages gl)
50 (gnu packages sdl)
51 (gnu packages maths)
52 (gnu packages image))
53
54(define (package-with-guile p guile)
55 (package
56 (inherit p)
57 (inputs
58 (map (match-lambda
59 (("guile" _)
60 `("guile" ,guile))
61 (input input))
62 (package-inputs p)))))
63
4ba1a033 64(define (package-with-guile-2.2 p)
0542d928 65 (package-with-guile p guile-2.2.4))
98dc87a0
DT
66
67(define guile-sdl2
e61e1f84 68 (let ((commit "5a6ea82c9ad859972c01d2908b2f66fb3addcfbb"))
1bc3c115
DT
69 (package
70 (name "guile-sdl2")
faa92ac6 71 (version (string-append "0.2.0-1." (string-take commit 7)))
1bc3c115
DT
72 (source (origin
73 (method git-fetch)
74 (uri (git-reference
75 (url "git://dthompson.us/guile-sdl2.git")
76 (commit commit)))
77 (sha256
78 (base32
e61e1f84 79 "1gc8f24l2y939a673kix0jd0kqr4zgwr8kd5qy60czqbqbjqrn96"))))
1bc3c115
DT
80 (build-system gnu-build-system)
81 (arguments
82 '(#:configure-flags
83 (list (string-append "--with-libsdl2-prefix="
84 (assoc-ref %build-inputs "sdl2"))
85 (string-append "--with-libsdl2-image-prefix="
86 (assoc-ref %build-inputs "sdl2-image"))
87 (string-append "--with-libsdl2-ttf-prefix="
88 (assoc-ref %build-inputs "sdl2-ttf"))
89 (string-append "--with-libsdl2-mixer-prefix="
90 (assoc-ref %build-inputs "sdl2-mixer")))
91 #:make-flags '("GUILE_AUTO_COMPILE=0")
92 #:phases
93 (modify-phases %standard-phases
94 (add-after 'unpack 'bootstrap
95 (lambda _
faa92ac6 96 (zero? (system* "sh" "bootstrap")))))))
1bc3c115
DT
97 (native-inputs
98 `(("autoconf" ,autoconf)
99 ("automake" ,automake)
100 ("pkg-config" ,pkg-config)
101 ("texinfo" ,texinfo)))
102 (inputs
0542d928 103 `(("guile" ,guile-2.2.4)
1bc3c115
DT
104 ("sdl2" ,sdl2)
105 ("sdl2-image" ,sdl2-image)
106 ("sdl2-mixer" ,sdl2-mixer)
107 ("sdl2-ttf" ,sdl2-ttf)))
108 (synopsis "Guile bindings for SDL2")
109 (description "Guile-sdl2 provides pure Guile Scheme bindings to the
98dc87a0 110SDL2 C shared library via the foreign function interface.")
1bc3c115
DT
111 (home-page "https://git.dthompson.us/guile-sdl2.git")
112 (license lgpl3+))))
98dc87a0
DT
113
114(package
115 (name "chickadee")
116 (version "0.1")
117 (source #f)
118 (build-system gnu-build-system)
119 (native-inputs
120 `(("autoconf" ,autoconf)
121 ("automake" ,automake)
122 ("pkg-config" ,pkg-config)
123 ("texinfo" ,texinfo)))
124 (inputs
0542d928 125 `(("guile" ,guile-2.2.4)))
98dc87a0 126 (propagated-inputs
4ba1a033
DT
127 `(("guile-opengl" ,(package-with-guile-2.2 guile-opengl))
128 ("guile-sdl2" ,guile-sdl2)))
98dc87a0
DT
129 (synopsis "Game development toolkit for Guile Scheme")
130 (description "Chickadee is a game development toolkit for Guile
131Scheme. It contains all of the basic components needed to develop
1322D/3D video games.")
133 (home-page "https://dthompson.us/projects/chickadee.html")
134 (license gpl3+))