aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/celt
diff options
context:
space:
mode:
authorcodyopel <codyopel@gmail.com>2015-02-08 12:30:22 -0500
committercodyopel <codyopel@gmail.com>2015-02-08 12:30:37 -0500
commitcd21ff13112756f58a72b1381a37d9427f3c19ab (patch)
treec51bc7275815356341e3ddd1dbcce6b567b88cfa /pkgs/development/libraries/celt
parent81ee8701f38e7a299094085b4684596bca273d26 (diff)
celt: refactor to generic
Diffstat (limited to 'pkgs/development/libraries/celt')
-rw-r--r--pkgs/development/libraries/celt/0.5.1.nix51
-rw-r--r--pkgs/development/libraries/celt/0.7.nix51
-rw-r--r--pkgs/development/libraries/celt/default.nix50
-rw-r--r--pkgs/development/libraries/celt/generic.nix23
4 files changed, 44 insertions, 131 deletions
diff --git a/pkgs/development/libraries/celt/0.5.1.nix b/pkgs/development/libraries/celt/0.5.1.nix
index a520ffd9c0f3..561be1ba2819 100644
--- a/pkgs/development/libraries/celt/0.5.1.nix
+++ b/pkgs/development/libraries/celt/0.5.1.nix
@@ -1,47 +1,10 @@
-x@{builderDefsPackage
- , ...}:
-builderDefsPackage
-(a :
-let
- helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
- [];
+{ callPackage, fetchurl, ... } @ args:
- buildInputs = map (n: builtins.getAttr n x)
- (builtins.attrNames (builtins.removeAttrs x helperArgNames));
- sourceInfo = rec {
- baseName="celt";
- version="0.5.1.3";
- name="${baseName}-${version}";
- url="http://downloads.xiph.org/releases/${baseName}/${name}.tar.gz";
- hash="0bkam9z5vnrxpbxkkh9kw6yzjka9di56h11iijikdd1f71l5nbpw";
- };
-in
-rec {
- src = a.fetchurl {
- url = sourceInfo.url;
- sha256 = sourceInfo.hash;
- };
-
- inherit (sourceInfo) name version;
- inherit buildInputs;
+callPackage ./generic.nix (args // rec{
+ version = "0.5.1.3";
- /* 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 = a.lib.licenses.free;
- branch = "0.5.1";
- };
- passthru = {
- updateInfo = {
- downloadPage = "http://www.celt-codec.org/downloads/";
- };
+ src = fetchurl {
+ url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz";
+ sha256 = "0bkam9z5vnrxpbxkkh9kw6yzjka9di56h11iijikdd1f71l5nbpw";
};
-}) x
+})
diff --git a/pkgs/development/libraries/celt/0.7.nix b/pkgs/development/libraries/celt/0.7.nix
index db4c0821336b..a5dd401ec49d 100644
--- a/pkgs/development/libraries/celt/0.7.nix
+++ b/pkgs/development/libraries/celt/0.7.nix
@@ -1,47 +1,10 @@
-x@{builderDefsPackage
- , ...}:
-builderDefsPackage
-(a :
-let
- helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
- [];
+{ callPackage, fetchurl, ... } @ args:
- 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;
+callPackage ./generic.nix (args // rec{
+ version = "0.7.1";
- /* 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 = a.lib.licenses.free;
- branch = "0.7";
- };
- passthru = {
- updateInfo = {
- downloadPage = "http://www.celt-codec.org/downloads/";
- };
+ src = fetchurl {
+ url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz";
+ sha256 = "0rihjgzrqcprsv8a1pmiglwik7xqbs2yw3fwd6gb28chnpgy5w4k";
};
-}) x
+})
diff --git a/pkgs/development/libraries/celt/default.nix b/pkgs/development/libraries/celt/default.nix
index 03eba5a8d254..61352d5caf93 100644
--- a/pkgs/development/libraries/celt/default.nix
+++ b/pkgs/development/libraries/celt/default.nix
@@ -1,46 +1,10 @@
-x@{builderDefsPackage
- , ...}:
-builderDefsPackage
-(a :
-let
- helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
- [];
+{ callPackage, fetchurl, ... } @ args:
- buildInputs = map (n: builtins.getAttr n x)
- (builtins.attrNames (builtins.removeAttrs x helperArgNames));
- sourceInfo = rec {
- baseName="celt";
- version="0.11.3";
- name="${baseName}-${version}";
- url="http://downloads.xiph.org/releases/${baseName}/${name}.tar.gz";
- hash="0dh893wqbh0q4a0x1xyqryykmnhpv7mkblpch019s04a99fq2r3y";
- };
-in
-rec {
- src = a.fetchurl {
- url = sourceInfo.url;
- sha256 = sourceInfo.hash;
- };
-
- inherit (sourceInfo) name version;
- inherit buildInputs;
+callPackage ./generic.nix (args // rec{
+ version = "0.11.3";
- /* doConfigure should be removed if not needed */
- phaseNames = ["doConfigure" "doMakeInstall"];
-
- meta = {
- description = "Low-delay audio codec";
- maintainers = with a.lib.maintainers;
- [
- raskin
- ];
- platforms = with a.lib.platforms;
- linux;
- license = a.lib.licenses.free;
- };
- passthru = {
- updateInfo = {
- downloadPage = "http://www.celt-codec.org/downloads/";
- };
+ src = fetchurl {
+ url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz";
+ sha256 = "0dh893wqbh0q4a0x1xyqryykmnhpv7mkblpch019s04a99fq2r3y";
};
-}) x
+})
diff --git a/pkgs/development/libraries/celt/generic.nix b/pkgs/development/libraries/celt/generic.nix
new file mode 100644
index 000000000000..59778d36f858
--- /dev/null
+++ b/pkgs/development/libraries/celt/generic.nix
@@ -0,0 +1,23 @@
+{ stdenv, version, src
+, liboggSupport ? true, libogg ? null # if disabled only the library will be built
+, ...
+}:
+
+# The celt codec has been deprecated and is now a part of the opus codec
+
+stdenv.mkDerivation rec {
+ name = "celt-${version}";
+
+ inherit src;
+
+ buildInputs = []
+ ++ stdenv.lib.optional liboggSupport libogg;
+
+ meta = with stdenv.lib; {
+ description = "Ultra-low delay audio codec";
+ homepage = http://www.celt-codec.org/;
+ license = licenses.bsd2;
+ maintainers = with maintainers; [ codyopel raskin ];
+ platform = platforms.unix;
+ };
+}