From b68a79ee4b02cb3a90c7486adbd151af7909dc23 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 12 Nov 2015 08:42:10 -0500 Subject: guix: Add a complete package for development snapshots. * guix.scm: Add source code information and necessary build options. * INSTALL.org: Add Guix installation instructions. * README: Add configure flags for Guix dev environments. --- guix.scm | 53 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 14 deletions(-) (limited to 'guix.scm') 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") -- cgit v1.2.3