summary refs log tree commit diff
path: root/pkgs/development/libraries/openal-soft/default.nix
blob: eedc9e9ff93f97f9204abb4dd1cbd9d50c4fa9f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchurl, cmake
, alsaSupport ? true, alsaLib ? null
, pulseSupport ? true, pulseaudio ? null
}:

with stdenv.lib;

assert alsaSupport -> alsaLib != null;
assert pulseSupport -> pulseaudio != null;

stdenv.mkDerivation rec {
  version = "1.16.0";
  name = "openal-soft-${version}";

  src = fetchurl {
    url = "http://kcat.strangesoft.net/openal-releases/${name}.tar.bz2";
    sha256 = "0pqdykdclycfnk66v166srjrry936y39d1dz9wl92qz27wqwsg9g";
  };

  buildInputs = [ cmake ]
    ++ optional alsaSupport alsaLib
    ++ optional pulseSupport pulseaudio;

  NIX_LDFLAGS = []
    ++ optional alsaSupport "-lasound"
    ++ optional pulseSupport "-lpulse";

  meta = {
    description = "OpenAL alternative";
    homepage = http://kcat.strangesoft.net/openal.html;
    license = licenses.lgpl2;
    maintainers = with maintainers; [ftrvxmtrx];
  };
}