2014-06-15 02:39:25 -07:00
|
|
|
{ stdenv, fetchurl, cmake
|
2016-02-29 10:47:12 -08:00
|
|
|
, alsaSupport ? !stdenv.isDarwin, alsaLib ? null
|
|
|
|
, pulseSupport ? !stdenv.isDarwin, libpulseaudio ? null
|
|
|
|
, CoreServices, AudioUnit, AudioToolbox
|
2014-06-15 02:39:25 -07:00
|
|
|
}:
|
2010-07-28 04:55:54 -07:00
|
|
|
|
2015-02-20 15:43:40 -08:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2014-06-15 02:39:25 -07:00
|
|
|
assert alsaSupport -> alsaLib != null;
|
2015-05-27 12:42:15 -07:00
|
|
|
assert pulseSupport -> libpulseaudio != null;
|
2007-11-30 21:56:58 -08:00
|
|
|
|
2014-06-15 02:39:25 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2016-02-29 10:46:34 -08:00
|
|
|
version = "1.17.2";
|
2013-04-01 08:52:57 -07:00
|
|
|
name = "openal-soft-${version}";
|
2007-11-30 21:56:58 -08:00
|
|
|
|
2008-01-28 11:35:40 -08:00
|
|
|
src = fetchurl {
|
2013-04-01 08:52:57 -07:00
|
|
|
url = "http://kcat.strangesoft.net/openal-releases/${name}.tar.bz2";
|
2016-02-29 10:46:34 -08:00
|
|
|
sha256 = "051k5fy8pk4fd9ha3qaqcv08xwbks09xl5qs4ijqq2qz5xaghhd3";
|
2007-11-30 21:56:58 -08:00
|
|
|
};
|
|
|
|
|
2014-06-15 02:39:25 -07:00
|
|
|
buildInputs = [ cmake ]
|
2015-02-20 15:43:40 -08:00
|
|
|
++ optional alsaSupport alsaLib
|
2016-02-29 10:47:12 -08:00
|
|
|
++ optional pulseSupport libpulseaudio
|
2016-10-01 13:38:06 -07:00
|
|
|
++ optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
|
2014-06-15 02:39:25 -07:00
|
|
|
|
|
|
|
NIX_LDFLAGS = []
|
2015-02-20 15:43:40 -08:00
|
|
|
++ optional alsaSupport "-lasound"
|
|
|
|
++ optional pulseSupport "-lpulse";
|
2014-06-15 02:39:25 -07:00
|
|
|
|
2007-11-30 21:56:58 -08:00
|
|
|
meta = {
|
2010-07-28 04:55:54 -07:00
|
|
|
description = "OpenAL alternative";
|
|
|
|
homepage = http://kcat.strangesoft.net/openal.html;
|
2015-02-20 15:43:40 -08:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
maintainers = with maintainers; [ftrvxmtrx];
|
2016-02-29 10:47:12 -08:00
|
|
|
platforms = platforms.unix;
|
2007-11-30 21:56:58 -08:00
|
|
|
};
|
|
|
|
}
|