nixpkgs/pkgs/development/libraries/openal-soft/default.nix

35 lines
865 B
Nix
Raw Normal View History

{ stdenv, fetchurl, cmake
, alsaSupport ? true, alsaLib ? null
, pulseSupport ? true, libpulseaudio ? null
}:
2015-02-20 23:43:40 +00:00
with stdenv.lib;
assert alsaSupport -> alsaLib != null;
assert pulseSupport -> libpulseaudio != null;
stdenv.mkDerivation rec {
2015-02-20 23:43:40 +00:00
version = "1.16.0";
2013-04-01 16:52:57 +01:00
name = "openal-soft-${version}";
src = fetchurl {
2013-04-01 16:52:57 +01:00
url = "http://kcat.strangesoft.net/openal-releases/${name}.tar.bz2";
2015-02-20 23:43:40 +00:00
sha256 = "0pqdykdclycfnk66v166srjrry936y39d1dz9wl92qz27wqwsg9g";
};
buildInputs = [ cmake ]
2015-02-20 23:43:40 +00:00
++ optional alsaSupport alsaLib
++ optional pulseSupport libpulseaudio;
NIX_LDFLAGS = []
2015-02-20 23:43:40 +00:00
++ optional alsaSupport "-lasound"
++ optional pulseSupport "-lpulse";
meta = {
description = "OpenAL alternative";
homepage = http://kcat.strangesoft.net/openal.html;
2015-02-20 23:43:40 +00:00
license = licenses.lgpl2;
maintainers = with maintainers; [ftrvxmtrx];
};
}