nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 cmake,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "bcg729";
10 version = "1.1.1";
11
12 src = fetchFromGitLab {
13 domain = "gitlab.linphone.org";
14 owner = "public";
15 group = "BC";
16 repo = "bcg729";
17 tag = finalAttrs.version;
18 sha256 = "1hal6b3w6f8y5r1wa0xzj8sj2jjndypaxyw62q50p63garp2h739";
19 };
20
21 nativeBuildInputs = [ cmake ];
22
23 postPatch = ''
24 substituteInPlace CMakeLists.txt \
25 --replace-fail '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR}
26
27 # cmake 4 compatibility, upstream has patches but they don't backport cleanly
28 substituteInPlace CMakeLists.txt \
29 --replace-fail "cmake_minimum_required(VERSION 3.1)" "cmake_minimum_required(VERSION 3.10)"
30 '';
31
32 meta = {
33 description = "Opensource implementation of both encoder and decoder of the ITU G729 Annex A/B speech codec";
34 homepage = "https://linphone.org/technical-corner/bcg729";
35 changelog = "https://gitlab.linphone.org/BC/public/bcg729/raw/${finalAttrs.version}/NEWS";
36 license = lib.licenses.gpl3Plus;
37 maintainers = with lib.maintainers; [ c0bw3b ];
38 platforms = lib.platforms.all;
39 };
40})