Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
cmake,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
libmysofa,
|
|
zlib,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libspatialaudio";
|
|
version = "0.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "videolabs";
|
|
repo = "libspatialaudio";
|
|
rev = version;
|
|
hash = "sha256-sPnQPD41AceXM4uGqWXMYhuQv0TUkA6TZP8ChxUFIoI=";
|
|
};
|
|
|
|
# Fix the build with CMake 4.
|
|
#
|
|
# See: <https://github.com/videolabs/libspatialaudio/commit/cec3eeac0984cfd8c1d09fef0dd511c6ccf2a175>
|
|
postPatch = ''
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace-fail \
|
|
'cmake_minimum_required(VERSION 3.1)' \
|
|
'cmake_minimum_required(VERSION 3.5)'
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [
|
|
libmysofa
|
|
zlib
|
|
];
|
|
|
|
postFixup = ''
|
|
substituteInPlace "''${!outputDev}/lib/pkgconfig/spatialaudio.pc" \
|
|
--replace '-L${lib.getDev libmysofa}' '-L${lib.getLib libmysofa}'
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Ambisonic encoding / decoding and binauralization library in C++";
|
|
homepage = "https://github.com/videolabs/libspatialaudio";
|
|
license = licenses.lgpl21Plus;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ krav ];
|
|
};
|
|
}
|