From 51e995f00622e00e26e4a6615cf6a3eae6e4b5d3 Mon Sep 17 00:00:00 2001 From: codyopel Date: Sun, 8 Feb 2015 17:12:58 -0500 Subject: [PATCH] fdk-aac: refactor and add example optional --- .../development/libraries/fdk-aac/default.nix | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/fdk-aac/default.nix b/pkgs/development/libraries/fdk-aac/default.nix index a9c8b19dc501..0694b7d3018c 100644 --- a/pkgs/development/libraries/fdk-aac/default.nix +++ b/pkgs/development/libraries/fdk-aac/default.nix @@ -1,19 +1,25 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl +, exampleSupport ? true # Example encoding program +}: -let version = "0.1.3"; -in -stdenv.mkDerivation { +with stdenv.lib; +stdenv.mkDerivation rec { name = "fdk-aac-${version}"; + version = "0.1.3"; src = fetchurl { - url = "mirror://sourceforge/opencore-amr/fdk-aac/fdk-aac-${version}.tar.gz"; + url = "mirror://sourceforge/opencore-amr/fdk-aac/${name}.tar.gz"; sha256 = "138c1l6c571289czihk0vlcfbla7qlac2jd5yyps5dyg08l8gjx9"; }; - meta = with stdenv.lib; { + configureFlags = [ ] + ++ optional exampleSupport "--enable-example"; + + meta = { description = "A high-quality implementation of the AAC codec from Android"; - homepage = "http://sourceforge.net/projects/opencore-amr/"; - license = licenses.asl20; - platforms = platforms.linux; + homepage = http://sourceforge.net/projects/opencore-amr/; + license = licenses.asl20; + maintainers = with maintainers; [ codyopel ]; + platforms = platforms.all; }; }