summaryrefslogtreecommitdiff
path: root/guix.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix.scm')
-rw-r--r--guix.scm53
1 files changed, 39 insertions, 14 deletions
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")