Merge pull request #6241 from codyopel/faad2

faad2: refactor and add drm optional

+15 -6
+15 -6
pkgs/development/libraries/faad2/default.nix
··· 1 - {stdenv, fetchurl}: 1 + {stdenv, fetchurl 2 + , drmSupport ? false # Digital Radio Mondiale 3 + }: 2 4 3 - stdenv.mkDerivation { 4 - name = "faad2-2.7"; 5 + with stdenv.lib; 6 + stdenv.mkDerivation rec { 7 + name = "faad2-${version}"; 8 + version = "2.7"; 5 9 6 10 src = fetchurl { 7 - url = mirror://sourceforge/faac/faad2-2.7.tar.bz2; 11 + url = "mirror://sourceforge/faac/${name}.tar.bz2"; 8 12 sha256 = "1db37ydb6mxhshbayvirm5vz6j361bjim4nkpwjyhmy4ddfinmhl"; 9 13 }; 10 14 15 + configureFlags = [] 16 + ++ optional drmSupport "--with-drm"; 17 + 11 18 meta = { 12 19 description = "An open source MPEG-4 and MPEG-2 AAC decoder"; 13 - homepage = http://www.audiocoding.com/faad2.html; 14 - license = stdenv.lib.licenses.gpl2; 20 + homepage = http://www.audiocoding.com/faad2.html; 21 + license = licenses.gpl2; 22 + maintainers = with maintainers; [ codyopel ]; 23 + platforms = platforms.all; 15 24 }; 16 25 }