summaryrefslogtreecommitdiff
path: root/guix.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2021-04-16 17:44:49 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2021-04-16 17:44:59 -0400
commit8de38cdc53b8bc1ce7d6e5bca1b00ada93e0f967 (patch)
tree22d7723206de00362b28636be959a8585d36439e /guix.scm
Add project scaffolding.
Diffstat (limited to 'guix.scm')
-rw-r--r--guix.scm194
1 files changed, 194 insertions, 0 deletions
diff --git a/guix.scm b/guix.scm
new file mode 100644
index 0000000..6950844
--- /dev/null
+++ b/guix.scm
@@ -0,0 +1,194 @@
+(use-modules (ice-9 match)
+ (srfi srfi-1)
+ (guix build-system gnu)
+ (guix download)
+ (guix git-download)
+ ((guix licenses) #:prefix license:)
+ (guix packages)
+ (guix utils)
+ (gnu packages)
+ (gnu packages audio)
+ (gnu packages autotools)
+ (gnu packages fontutils)
+ (gnu packages gl)
+ (gnu packages guile)
+ (gnu packages image)
+ (gnu packages maths)
+ (gnu packages mp3)
+ (gnu packages pkg-config)
+ (gnu packages sdl)
+ (gnu packages texinfo)
+ (gnu packages xiph))
+
+(define target-guile
+ (package
+ (inherit guile-3.0-latest)
+ (source (origin
+ (inherit (package-source guile-3.0-latest))
+ (patches (list "0001-goops-Preserve-all-slot-options-in-redefinable-class.patch"))))
+ (arguments
+ `(#:tests? #f ,@(package-arguments guile-3.0-latest)))))
+
+(define guile3.0-opengl
+ (package
+ (inherit guile-opengl)
+ (inputs
+ (map (match-lambda
+ (("guile" _)
+ `("guile" ,target-guile))
+ (input input))
+ (package-inputs guile-opengl)))
+ (native-inputs
+ (append (package-native-inputs guile-opengl)
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments guile-opengl)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'patch-makefile)
+ (add-before 'bootstrap 'patch-configure.ac
+ (lambda _
+ ;; The Guile version check doesn't work for the 3.0
+ ;; pre-release, so just remove it.
+ (substitute* "configure.ac"
+ (("GUILE_PKG\\(\\[2.2 2.0\\]\\)") ""))
+ (substitute* "Makefile.am"
+ (("\\$\\(GUILE_EFFECTIVE_VERSION\\)") "3.0")
+ (("ccache") "site-ccache"))
+ #t))
+ (replace 'bootstrap
+ (lambda _
+ (invoke "autoreconf" "-vfi")))))))))
+
+(define guile-sdl2
+ (let ((commit "90578fd69c2eeebc3956d5fcc47d7f771270b5c4"))
+ (package
+ (name "guile-sdl2")
+ (version (string-append "0.5.0-1." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.dthompson.us/guile-sdl2.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "1dk4k1p0b80i6yfyhpfygagb3xmk7njd2v82xnd0nn0b962p7p78"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags '("GUILE_AUTO_COMPILE=0")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda _
+ (invoke "sh" "bootstrap"))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)
+ ("texinfo" ,texinfo)))
+ (inputs
+ `(("guile" ,target-guile)
+ ("sdl2" ,sdl2)
+ ("sdl2-image" ,sdl2-image)))
+ (synopsis "Guile bindings for SDL2")
+ (description "Guile-sdl2 provides pure Guile Scheme bindings to the
+SDL2 C shared library via the foreign function interface.")
+ (home-page "https://git.dthompson.us/guile-sdl2.git")
+ (license license:lgpl3+))))
+
+(define chickadee
+ (let ((commit "d4d82c8f2259f368085ce4cb31a3de1751199edd"))
+ (package
+ (name "chickadee")
+ (version (string-append "0.5.0-1." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.dthompson.us/chickadee.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "1flral9nsxqydsmvw1lprrhkvn4xdkjv1lx4imr0i9lhdx1nbzq5"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags '("GUILE_AUTO_COMPILE=0")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda _
+ (invoke "sh" "bootstrap"))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)
+ ("texinfo" ,texinfo)))
+ (inputs
+ `(("freetype" ,freetype)
+ ("guile" ,target-guile)
+ ("libvorbis" ,libvorbis)
+ ("mpg123" ,mpg123)
+ ("openal" ,openal)))
+ (propagated-inputs
+ `(("guile-opengl" ,guile3.0-opengl)
+ ("guile-sdl2" ,guile-sdl2)))
+ (synopsis "Game development toolkit for Guile Scheme")
+ (description "Chickadee is a game development toolkit for Guile
+Scheme. It contains all of the basic components needed to develop
+2D/3D video games.")
+ (home-page "https://dthompson.us/projects/chickadee.html")
+ (license license:gpl3+))))
+
+(define starling
+ (let ((commit "960336af94a4e438de99f2893160735fed55f532"))
+ (package
+ (name "starling")
+ (version (string-append "0.1.0-1." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.dthompson.us/starling.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "1nljfwi73pbqq1hkh10kq4z0aak9pd2w05c93fw6z1j14md0rxi0"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags '("GUILE_AUTO_COMPILE=0")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda _
+ (invoke "sh" "bootstrap"))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("guile" ,target-guile)))
+ (propagated-inputs
+ `(("chickadee" ,chickadee)
+ ("guile-sdl2" ,guile-sdl2)))
+ (synopsis "Game engine for Guile Scheme")
+ (description "Starling is a game engine that I haven't released
+yet.")
+ (home-page "https://git.dthompson.us/starling.git")
+ (license license:gpl3+))))
+
+(package
+ (name "spring-lisp-game-jam-2021")
+ (version "0.1")
+ (source #f)
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("guile" ,target-guile)))
+ (propagated-inputs
+ `(("starling" ,starling)))
+ (synopsis "Spring Lisp Game Jam 2021 Entry")
+ (description "Dave's Spring Lisp Game 2021 entry.")
+ (home-page "https://git.dthompson.us/spring-lisp-game-jam-2021.git")
+ (license license:gpl3+))