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