1{ lib, stdenv, fetchurl, unzip }:
2
3stdenv.mkDerivation rec {
4 pname = "amrwb";
5 version = "11.0.0.0";
6
7 srcAmr = fetchurl {
8 url = "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-b00.zip";
9 sha256 = "1v4zhs6f1mf1xkrzhljh05890in0rpr5d5pcak9h4igxhd2c91f8";
10 };
11
12 src = fetchurl {
13 url = "http://www.penguin.cz/~utx/ftp/amr/amrwb-${version}.tar.bz2";
14 sha256 = "1p6m9nd08mv525w14py9qzs9zwsa5i3vxf5bgcmcvc408jqmkbsw";
15 };
16
17 nativeBuildInputs = [ unzip ];
18
19 configureFlags = [ "--cache-file=config.cache" "--with-downloader=true" ];
20
21 postConfigure = ''
22 cp $srcAmr 26204-b00.zip
23 '';
24
25 meta = {
26 homepage = "http://www.penguin.cz/~utx/amr";
27 description = "AMR Wide-Band Codec";
28 # The wrapper code is free, but not the libraries from 3gpp.
29 # It's a source code reference implementation with patents and licenses on
30 # some countries, not redistributable.
31 license = lib.licenses.unfree;
32 };
33}