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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.5 KiB
Nix
Raw Normal View History

2022-04-27 13:54:16 +00:00
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
, alsaSupport ? !stdenv.isDarwin, alsa-lib
2022-04-27 13:54:16 +00:00
, dbusSupport ? !stdenv.isDarwin, dbus
, pipewireSupport ? !stdenv.isDarwin, pipewire
, pulseSupport ? !stdenv.isDarwin, libpulseaudio
2016-02-29 18:47:12 +00:00
, CoreServices, AudioUnit, AudioToolbox
}:
stdenv.mkDerivation rec {
pname = "openal-soft";
2022-04-27 13:54:16 +00:00
version = "1.22.0";
src = fetchFromGitHub {
owner = "kcat";
repo = "openal-soft";
2021-08-21 15:00:51 +00:00
rev = version;
2022-04-27 13:54:16 +00:00
sha256 = "sha256-Y2KhPkwtG6tBzUhSqwV2DVnOjZwxPihidLKahjaIvyU=";
};
# this will make it find its own data files (e.g. HRTF profiles)
# without any other configuration
patches = [ ./search-out.patch ];
postPatch = ''
2022-04-27 13:54:16 +00:00
substituteInPlace core/helpers.cpp \
--replace "@OUT@" $out
'';
strictDeps = true;
2022-04-27 13:54:16 +00:00
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) stdenv.cc.libc
++ lib.optional alsaSupport alsa-lib
2022-04-27 13:54:16 +00:00
++ lib.optional dbusSupport dbus
++ lib.optional pipewireSupport pipewire
++ lib.optional pulseSupport libpulseaudio
++ lib.optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
2022-04-27 13:54:16 +00:00
cmakeFlags = [
# Automatically links dependencies without having to rely on dlopen, thus
# removes the need for NIX_LDFLAGS.
"-DALSOFT_DLOPEN=OFF"
];
meta = with lib; {
description = "OpenAL alternative";
homepage = "https://kcat.strangesoft.net/openal.html";
2015-02-20 23:43:40 +00:00
license = licenses.lgpl2;
maintainers = with maintainers; [ftrvxmtrx];
2016-02-29 18:47:12 +00:00
platforms = platforms.unix;
};
}