summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL.org42
-rw-r--r--README3
-rw-r--r--guix.scm53
3 files changed, 69 insertions, 29 deletions
diff --git a/INSTALL.org b/INSTALL.org
index bd8ea7f..fb1fda4 100644
--- a/INSTALL.org
+++ b/INSTALL.org
@@ -1,12 +1,24 @@
-* Installation Instructions
+Installation Instructions
+
+* Installation via Guix
+
+ Users of the [[http://gnu.org/software/guix][GNU Guix]] package manager can easily install a
+ development snapshot by running a single command from the root of
+ the Sly source tree:
+
+ #+BEGIN_SRC sh
+ guix package -f guix.scm
+ #+END_SRC
+
+* Alternative Installation (for non-Guix users)
+
+** Install dependencies
Installing Sly is rather easy (but not easy enough) if you are on a
GNU/Linux system. This installation guide assumes that you have the
GNU build system (automake, autoconf, texinfo, pkg-config) and git
installed.
-** Install dependencies
-
*** Guile
*Debian*
@@ -107,19 +119,19 @@
** Install Sly
- Once the dependencies have been installed, installing Sly is
- pretty straightforward.
+ Once the dependencies have been installed, installing Sly is
+ pretty straightforward.
- *GNU/Linux*
+ *GNU/Linux*
- #+BEGIN_SRC sh
- git clone https://git.dthompson.us/sly.git
- cd sly/
- ./autogen.sh
- ./configure --prefix=/usr
- make
- sudo make install
- #+END_SRC
+ #+BEGIN_SRC sh
+ git clone https://git.dthompson.us/sly.git
+ cd sly/
+ ./autogen.sh
+ ./configure --prefix=/usr
+ make
+ sudo make install
+ #+END_SRC
*** Install to /usr/local
@@ -131,7 +143,7 @@
sudo make install
#+END_SRC
- Then use the same call to run guile:
+ Then use the same call to run Guile:
#+BEGIN_SRC
GUILE_LOAD_PATH=/usr/local/share/guile/site/2.0/:/usr/local/share/guile/site/ guile
diff --git a/README b/README
index e820e16..ca6e21a 100644
--- a/README
+++ b/README
@@ -160,6 +160,9 @@ Sly differentiates itself from most other game engines by encouraging
#+BEGIN_SRC sh
guix environment -l guix.scm
+ ./bootstrap && ./configure \
+ --with-libfreeimage-prefix=$(guix build freeimage) \
+ --with-libgslcblas-prefix=$(guix build gsl)
#+END_SRC
* Running Examples
diff --git a/guix.scm b/guix.scm
index 986cd16..344449a 100644
--- a/guix.scm
+++ b/guix.scm
@@ -19,10 +19,26 @@
;;
;; Development environment for GNU Guix.
;;
+;; To setup the development environment, run the following:
+;;
+;; guix environment -l guix.scm
+;; ./bootstrap && ./configure \
+;; --with-libfreeimage-prefix=$(guix build freeimage) \
+;; --with-libgslcblas-prefix=$(guix build gsl)
+;;
+;; To build the development snapshot, run:
+;;
+;; guix build -f guix.scm
+;;
+;; To install the development snapshot, run:
+;;
+;; guix install -f guix.scm
+;;
;;; Code:
(use-modules (guix packages)
(guix licenses)
+ (guix git-download)
(guix build-system gnu)
(gnu packages)
(gnu packages autotools)
@@ -34,30 +50,39 @@
(gnu packages maths)
(gnu packages image))
-;; The development environment needs a tweaked LTDL_LIBRARY_PATH for
-;; finding libfreeimage.
-(define freeimage
- (package (inherit freeimage)
- (native-search-paths
- (list (search-path-specification
- (variable "LTDL_LIBRARY_PATH")
- (files '("lib")))))))
-
(package
(name "sly")
- (version "0.0")
- (source #f)
+ (version "0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://dthompson.us/sly.git")
+ (commit "c3b4824")))
+ (sha256
+ (base32
+ "0p2nj4snz0ny1f7x41knqg8y8x7wk3d794q8ifyh4iac0pbkfhac"))))
(build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda _ (zero? (system* "sh" "bootstrap")))))
+ #:configure-flags
+ (list (string-append "--with-libfreeimage-prefix="
+ (assoc-ref %build-inputs "freeimage"))
+ (string-append "--with-libgslcblas-prefix="
+ (assoc-ref %build-inputs "gsl")))))
(native-inputs
`(("pkg-config" ,pkg-config)
("autoconf" ,autoconf)
("automake" ,automake)
("texinfo" ,texinfo)))
- (inputs
+ (propagated-inputs
`(("guile" ,guile-2.0)
("guile-sdl" ,guile-sdl)
- ("guile-opengl" ,guile-opengl)
- ("gsl" ,gsl)
+ ("guile-opengl" ,guile-opengl)))
+ (inputs
+ `(("gsl" ,gsl)
("freeimage" ,freeimage)
("mesa" ,mesa)))
(synopsis "2D/3D game engine for GNU Guile")