nixpkgs/pkgs/development/libraries/openal/default.nix
Lluís Batlle i Rossell 69e566d983 Fixing and updating openal, about rpaths and cmake.
svn path=/nixpkgs/trunk/; revision=15097
2009-04-16 19:28:30 +00:00

55 lines
1.8 KiB
Nix

{ stdenv, fetchurl, alsaLib, cmake }:
let version = "1.7.411"; in
stdenv.mkDerivation rec {
name = "openal-${version}";
src = fetchurl {
url = "http://connect.creativelabs.com/openal/Downloads/openal-soft-${version}.bz2";
sha256 = "1nbqvg08hy5p2cxy2i2mmh2szmbpsg2dcvhr61iplyisw04rwc8i";
name = "openal-soft-${version}.tar.bz2";
};
buildInputs = [ cmake alsaLib ];
cmakeFlags = "-DCMAKE_SHARED_LINKER_FLAGS=\"-Wl,-rpath,$out/lib/\"" +
" -DCMAKE_EXE_LINKER_FLAGS=\"-Wl,-rpath,$out/lib\"" +
" -DCMAKE_SKIP_BUILD_RPATH=ON" +
" -DCMAKE_BUILD_TYPE=Release" +
" -DCMAKE_INSTALL_PREFIX=$out";
dontUseCmakeConfigure = true;
# I rewrote the configure phase to get the $out references evaluated in
# cmakeFlags
configurePhase = ''
set -x
mkdir -p build;
cd build
eval -- "cmake .. $cmakeFlags"
set +x
'';
meta = {
description = "OpenAL, a cross-platform 3D audio API";
longDescription = ''
OpenAL is a cross-platform 3D audio API appropriate for use with
gaming applications and many other types of audio applications.
The library models a collection of audio sources moving in a 3D
space that are heard by a single listener somewhere in that
space. The basic OpenAL objects are a Listener, a Source, and a
Buffer. There can be a large number of Buffers, which contain
audio data. Each buffer can be attached to one or more Sources,
which represent points in 3D space which are emitting audio.
There is always one Listener object (per audio context), which
represents the position where the sources are heard -- rendering
is done from the perspective of the Listener.
'';
homepage = http://www.openal.org/;
license = "GPLv2+";
};
}