mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +00:00
6130dfd3dc
This allows cross-compiling it.
40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{ stdenv, fetchurl, cmake
|
|
, alsaSupport ? !stdenv.isDarwin, alsaLib ? null
|
|
, pulseSupport ? !stdenv.isDarwin, libpulseaudio ? null
|
|
, CoreServices, AudioUnit, AudioToolbox
|
|
}:
|
|
|
|
with stdenv.lib;
|
|
|
|
assert alsaSupport -> alsaLib != null;
|
|
assert pulseSupport -> libpulseaudio != null;
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.17.2";
|
|
name = "openal-soft-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "http://kcat.strangesoft.net/openal-releases/${name}.tar.bz2";
|
|
sha256 = "051k5fy8pk4fd9ha3qaqcv08xwbks09xl5qs4ijqq2qz5xaghhd3";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = []
|
|
++ optional alsaSupport alsaLib
|
|
++ optional pulseSupport libpulseaudio
|
|
++ optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
|
|
|
|
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];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|