Files
nixpkgs/pkgs/by-name/li/libebur128/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
speexdsp,
pkg-config,
}:
stdenv.mkDerivation rec {
version = "1.2.6";
pname = "libebur128";
src = fetchFromGitHub {
owner = "jiixyj";
repo = "libebur128";
rev = "v${version}";
sha256 = "sha256-UKO2k+kKH/dwt2xfaYMrH/GXjEkIrnxh1kGG/3P5d3Y=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [ speexdsp ];
# https://github.com/jiixyj/libebur128/issues/121
postPatch = ''
substituteInPlace ebur128/libebur128.pc.cmake \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
''
# Fix the build with CMake 4.
#
# See:
#
# * <https://github.com/jiixyj/libebur128/issues/134>
# * <https://github.com/jiixyj/libebur128/pull/135>
+ ''
for file in CMakeLists.txt test/CMakeLists.txt; do
substituteInPlace "$file" \
--replace-fail \
'cmake_minimum_required(VERSION 2.8.12' \
'cmake_minimum_required(VERSION 3.10'
done
'';
meta = with lib; {
description = "Implementation of the EBU R128 loudness standard";
homepage = "https://github.com/jiixyj/libebur128";
license = licenses.mit;
maintainers = [ maintainers.andrewrk ];
platforms = platforms.unix;
};
}