From 3c82ed030fd3ee3967adc92747ef8f9d93a21cd6 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Tue, 7 Jun 2011 14:42:24 +0000 Subject: [PATCH] Adding GSM and CELT codecs; dependencies of sflphone - failed to buuild itself svn path=/nixpkgs/trunk/; revision=27364 --- pkgs/development/libraries/celt/0.7.nix | 47 ++++++++++++++++ pkgs/development/libraries/celt/default.nix | 47 ++++++++++++++++ pkgs/development/libraries/gsm/default.nix | 60 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 ++ 4 files changed, 159 insertions(+) create mode 100644 pkgs/development/libraries/celt/0.7.nix create mode 100644 pkgs/development/libraries/celt/default.nix create mode 100644 pkgs/development/libraries/gsm/default.nix diff --git a/pkgs/development/libraries/celt/0.7.nix b/pkgs/development/libraries/celt/0.7.nix new file mode 100644 index 000000000000..5c5dae866bb8 --- /dev/null +++ b/pkgs/development/libraries/celt/0.7.nix @@ -0,0 +1,47 @@ +x@{builderDefsPackage + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="celt"; + version="0.7.1"; + name="${baseName}-${version}"; + url="http://downloads.xiph.org/releases/${baseName}/${name}.tar.gz"; + hash="93f0e2dfb59021b19e69dc0dee855eb89f19397db1dea0d0d6f9329cff933066"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doConfigure" "doMakeInstall"]; + + meta = { + description = "CELT - low-delay audio codec"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + license = "free"; + }; + passthru = { + updateInfo = { + downloadPage = "http://www.celt-codec.org/downloads/"; + }; + }; +}) x + diff --git a/pkgs/development/libraries/celt/default.nix b/pkgs/development/libraries/celt/default.nix new file mode 100644 index 000000000000..471a47de4044 --- /dev/null +++ b/pkgs/development/libraries/celt/default.nix @@ -0,0 +1,47 @@ +x@{builderDefsPackage + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="celt"; + version="0.11.1"; + name="${baseName}-${version}"; + url="http://downloads.xiph.org/releases/${baseName}/${name}.tar.gz"; + hash="1gsc3pxydyzzra8w0r6hrrsalm76lrq4lw6bd283qa4bpagmghh1"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doConfigure" "doMakeInstall"]; + + meta = { + description = "CELT - low-delay audio codec"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + license = "free"; + }; + passthru = { + updateInfo = { + downloadPage = "http://www.celt-codec.org/downloads/"; + }; + }; +}) x + diff --git a/pkgs/development/libraries/gsm/default.nix b/pkgs/development/libraries/gsm/default.nix new file mode 100644 index 000000000000..c01987bcc59d --- /dev/null +++ b/pkgs/development/libraries/gsm/default.nix @@ -0,0 +1,60 @@ +x@{builderDefsPackage + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="gsm"; + version="1.0.13"; + name="${baseName}-${version}"; + url="http://www.quut.com/gsm/${name}.tar.gz"; + hash="1bcjl2h60gvr1dc5a963h3vnz9zl6n8qrfa3qmb2x3229lj1iiaj"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + /* doConfigure should be removed if not needed */ + phaseNames = ["createDirs" "setVars" "doMakeInstall"]; + + createDirs = a.fullDepEntry '' + ensureDir "$out/"{bin,lib,share/man,share/info,include/gsm} + '' ["minInit" "defEnsureDir"]; + + setVars = a.noDepEntry '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC" + ''; + + makeFlags = [ + ''INSTALL_ROOT="$out"'' + ''GSM_INSTALL_INC="$out/include/gsm"'' + ]; + + meta = { + description = "A GSM codec library"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + license = "free-noncopyleft"; + }; + passthru = { + updateInfo = { + downloadPage = "http://www.quut.com/gsm/"; + }; + }; +}) x + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be6acdab1280..79d45d849666 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2907,6 +2907,9 @@ let ccrtp = callPackage ../development/libraries/ccrtp { }; ccrtp_1_8 = callPackage ../development/libraries/ccrtp/1.8.nix { }; + celt = callPackage ../development/libraries/celt {}; + celt_0_7 = callPackage ../development/libraries/celt/0.7.nix {}; + cgui = callPackage ../development/libraries/cgui {}; check = callPackage ../development/libraries/check { }; @@ -3294,6 +3297,8 @@ let gsl = callPackage ../development/libraries/gsl { }; + gsm = callPackage ../development/libraries/gsm {}; + gsoap = callPackage ../development/libraries/gsoap { }; gss = callPackage ../development/libraries/gss { };