From 6813f70a5c02eec999850603bd99b6df4fd41bec Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 15 Dec 2015 13:30:11 -0500 Subject: [PATCH] gnu: Add sdl2-image. * gnu/packages/sdl.scm (propagated-inputs-with-sdl2): New procedure. (sdl2-image): New variable. --- gnu/packages/sdl.scm | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 1b64be024d..63c1037fcb 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 David Thompson +;;; Copyright © 2013, 2015 David Thompson ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015 Alex Kost @@ -20,6 +20,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages sdl) + #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module ((guix licenses) #:hide (freetype)) #:use-module (guix packages) @@ -299,6 +300,29 @@ directory.") (home-page (package-home-page sdl)) (license (package-license sdl)))) +(define (propagated-inputs-with-sdl2 package) + "Replace the \"sdl\" propagated input of PACKAGE with SDL2." + (map (match-lambda + (("sdl" _) + `("sdl2" ,sdl2)) + (other other)) + (package-propagated-inputs package))) + +(define-public sdl2-image + (package (inherit sdl-image) + (name "sdl2-image") + (version "2.0.0") + (source (origin + (method url-fetch) + (uri + (string-append "http://www.libsdl.org/projects/SDL_image/release/SDL2_image-" + version ".tar.gz")) + (sha256 + (base32 + "0d3jlhkmr0j5a2dd5h6y29jfcsj7mkl16wghm6n3nqqp7g3ib65j")))) + (propagated-inputs + (propagated-inputs-with-sdl2 sdl-image)))) + (define-public guile-sdl (package (name "guile-sdl")