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