From mboxrd@z Thu Jan 1 00:00:00 1970 From: ericbavier@openmailbox.org Subject: Re: [PATCH] gnu: Add ghc-sdl-mixer. Date: Thu, 22 Oct 2015 03:47:41 -0500 Message-ID: <1445503671-30014-13-git-send-email-ericbavier@openmailbox.org> References: <1445483479-19104-1-git-send-email-ericbavier@openmailbox.org> <1445503671-30014-1-git-send-email-ericbavier@openmailbox.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpG87-0003z6-DF for guix-devel@gnu.org; Thu, 22 Oct 2015 09:42:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpG83-00082f-Hk for guix-devel@gnu.org; Thu, 22 Oct 2015 09:42:07 -0400 Received: from smtp10.openmailbox.org ([62.4.1.44]:47286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpG83-00081q-Cd for guix-devel@gnu.org; Thu, 22 Oct 2015 09:42:03 -0400 In-Reply-To: <1445503671-30014-1-git-send-email-ericbavier@openmailbox.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org, Paul van der Walt From: Eric Bavier > * gnu/packages/haskell.scm (ghc-sdl-mixer): New variable. > --- > gnu/packages/haskell.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 42 insertions(+) > > diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm > index 161b3e5..914c518 100644 > --- a/gnu/packages/haskell.scm > +++ b/gnu/packages/haskell.scm > @@ -894,6 +894,48 @@ by MPEG playback software, emulators, and many popular games, including the > award winning Linux port of \"Civilization: Call To Power.\"") > (license bsd-3))) > > +(define-public ghc-sdl-mixer > + (package > + (name "ghc-sdl-mixer") > + (version "0.6.1.1") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + "http://hackage.haskell.org/package/SDL-mixer/SDL-mixer-" > + version > + ".tar.gz")) > + (sha256 > + (base32 > + "0md3238hx79mxb9a7l43kg3b3d28x4mqvj0hjsbsh15ajnvy9x2z")))) > + (build-system haskell-build-system) > + (arguments > + `(#:configure-flags > + (let* ((sdl-mixer (assoc-ref %build-inputs "sdl-mixer")) > + (sdl-mixer-lib (string-append sdl-mixer "/lib")) > + (sdl-mixer-include (string-append sdl-mixer "/include/SDL"))) > + (list (string-append "--extra-include-dirs=" sdl-mixer-include) > + (string-append "--extra-lib-dirs=" sdl-mixer-lib))) Is the --extra-lib-dirs argument really necessary? I think haskell-build-system already passes flags for every "lib" directory it sees in inputs. > + #:phases > + (modify-phases %standard-phases > + (add-before > + 'configure 'fix-/bin/sh > + (lambda _ > + ;; Use `sh', not `/bin/sh'. > + (substitute* (find-files "." "Makefile|configure") > + (("/bin/sh") "sh"))))))) See comments about ghc-doctest package. > + (propagated-inputs > + `(("sdl-mixer" ,sdl-mixer) I can understand propagating ghc-sdl, but is it necessary to propagate the sdl-mixer library too? > + ("ghc-sdl" ,ghc-sdl))) > + (home-page > + "http://hackage.haskell.org/package/SDL-mixer") > + (synopsis "Binding to libSDL_mixer") "Haskell bindings to libSDL_mixer" Similar comments for the ghc-sdl-image patch. `~Eric > + (description "SDL_mixer is a sample multi-channel audio mixer library. It > +supports any number of simultaneously playing channels of 16 bit stereo audio, > +plus a single channel of music, mixed by the popular MikMod MOD, Timidity > +MIDI, Ogg Vorbis, and SMPEG MP3 libraries.") > + (license bsd-3))) > + > (define-public ghc-half > (package > (name "ghc-half") > -- > 2.5.0 >