diff --git a/pkgs/development/libraries/celt/0.5.1.nix b/pkgs/development/libraries/celt/0.5.1.nix index a520ffd9c0f..561be1ba281 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; - }; +callPackage ./generic.nix (args // rec{ + version = "0.5.1.3"; - 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 = a.lib.licenses.free; - branch = "0.5.1"; + src = fetchurl { + url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz"; + sha256 = "0bkam9z5vnrxpbxkkh9kw6yzjka9di56h11iijikdd1f71l5nbpw"; }; - passthru = { - updateInfo = { - downloadPage = "http://www.celt-codec.org/downloads/"; - }; - }; -}) x +}) diff --git a/pkgs/development/libraries/celt/0.7.nix b/pkgs/development/libraries/celt/0.7.nix index db4c0821336..a5dd401ec49 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; - }; +callPackage ./generic.nix (args // rec{ + version = "0.7.1"; - 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 = a.lib.licenses.free; - branch = "0.7"; + src = fetchurl { + url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz"; + sha256 = "0rihjgzrqcprsv8a1pmiglwik7xqbs2yw3fwd6gb28chnpgy5w4k"; }; - 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 index 03eba5a8d25..61352d5caf9 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; - }; +callPackage ./generic.nix (args // rec{ + version = "0.11.3"; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* 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; + src = fetchurl { + url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz"; + sha256 = "0dh893wqbh0q4a0x1xyqryykmnhpv7mkblpch019s04a99fq2r3y"; }; - passthru = { - updateInfo = { - downloadPage = "http://www.celt-codec.org/downloads/"; - }; - }; -}) x +}) diff --git a/pkgs/development/libraries/celt/generic.nix b/pkgs/development/libraries/celt/generic.nix new file mode 100644 index 00000000000..59778d36f85 --- /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; + }; +}