1{
2 lib,
3 stdenv,
4 fetchurl,
5 autoreconfHook,
6 mp4v2Support ? true,
7 mp4v2,
8 drmSupport ? false, # Digital Radio Mondiale
9}:
10
11stdenv.mkDerivation rec {
12 pname = "faac";
13 version = "1.30";
14
15 src = fetchurl {
16 url = "mirror://sourceforge/faac/${pname}-${
17 builtins.replaceStrings [ "." ] [ "_" ] version
18 }.tar.gz";
19 sha256 = "1lmj0dib3mjp84jhxc5ddvydkzzhb0gfrdh3ikcidjlcb378ghxd";
20 };
21
22 configureFlags =
23 lib.optional mp4v2Support "--with-external-mp4v2" ++ lib.optional drmSupport "--enable-drm";
24
25 hardeningDisable = [ "format" ];
26
27 nativeBuildInputs = [ autoreconfHook ];
28
29 buildInputs = lib.optional mp4v2Support mp4v2;
30
31 enableParallelBuilding = true;
32
33 meta = with lib; {
34 description = "Open source MPEG-4 and MPEG-2 AAC encoder";
35 homepage = "https://github.com/knik0/faac";
36 license = licenses.unfreeRedistributable;
37 maintainers = with maintainers; [ codyopel ];
38 platforms = platforms.all;
39 };
40}