diff options
author | Alex Kost <alezost@gmail.com> | 2015-10-10 11:27:27 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2015-10-12 11:31:01 +0300 |
commit | 40e94665d41d737adb7162b26150d48b4079e073 (patch) | |
tree | de96638f45a7b0949d87e22ec5242de0367a4434 /gnu | |
parent | 0f6139b1b578b914e10898e7159cae9b32f1eff3 (diff) | |
download | guix-40e94665d41d737adb7162b26150d48b4079e073.tar.gz guix-40e94665d41d737adb7162b26150d48b4079e073.zip |
gnu: sdl-union: Wrap into a procedure and export it.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* gnu/packages/sdl.scm (sdl-union): Make it a procedure returning
'sdl-union' package.
(guile-sdl): Use it.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/sdl.scm | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 50fe01074d..1b64be024d 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013 David Thompson <dthompson2@worcester.edu> ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> +;;; Copyright © 2015 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,7 +43,8 @@ sdl-image sdl-mixer sdl-net - sdl-ttf)) + sdl-ttf + sdl-union)) (define sdl (package @@ -268,7 +270,10 @@ SDL.") (home-page "http://www.libsdl.org/projects/SDL_ttf/") (license zlib))) -(define sdl-union +(define* (sdl-union #:optional (packages (list sdl sdl-gfx sdl-net sdl-ttf + sdl-image sdl-mixer))) + "Return 'sdl-union' package which is a union of PACKAGES. +If PACKAGES are not specified, all SDL packages are used." (package (name "sdl-union") (version (package-version sdl)) @@ -283,12 +288,10 @@ SDL.") (((names . directories) ...) (union-build (assoc-ref %outputs "out") directories)))))) - (inputs `(("sdl" ,sdl) - ("sdl-gfx" ,sdl-gfx) - ("sdl-image" ,sdl-image) - ("sdl-mixer" ,sdl-mixer) - ("sdl-ttf" ,sdl-ttf))) - (synopsis "Union of all SDL libraries") + (inputs (map (lambda (package) + (list (package-name package) package)) + packages)) + (synopsis "Union of SDL libraries") (description "A union of SDL and its extension libraries. A union is required because sdl-config assumes that all of the headers and libraries are in the same @@ -316,7 +319,7 @@ directory.") ("libjpeg" ,libjpeg))) (inputs `(("guile" ,guile-2.0) - ("sdl-union" ,sdl-union))) + ("sdl-union" ,(sdl-union)))) (arguments '(#:configure-flags (list (string-append "--with-sdl-prefix=" |