lol
1{ stdenv, fetchurl, cmake
2, alsaSupport ? true, alsaLib ? null
3, pulseSupport ? true, libpulseaudio ? null
4}:
5
6with stdenv.lib;
7
8assert alsaSupport -> alsaLib != null;
9assert pulseSupport -> libpulseaudio != null;
10
11stdenv.mkDerivation rec {
12 version = "1.16.0";
13 name = "openal-soft-${version}";
14
15 src = fetchurl {
16 url = "http://kcat.strangesoft.net/openal-releases/${name}.tar.bz2";
17 sha256 = "0pqdykdclycfnk66v166srjrry936y39d1dz9wl92qz27wqwsg9g";
18 };
19
20 buildInputs = [ cmake ]
21 ++ optional alsaSupport alsaLib
22 ++ optional pulseSupport libpulseaudio;
23
24 NIX_LDFLAGS = []
25 ++ optional alsaSupport "-lasound"
26 ++ optional pulseSupport "-lpulse";
27
28 meta = {
29 description = "OpenAL alternative";
30 homepage = http://kcat.strangesoft.net/openal.html;
31 license = licenses.lgpl2;
32 maintainers = with maintainers; [ftrvxmtrx];
33 };
34}