Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

celt: refactor to generic

codyopel cd21ff13 81ee8701

+44 -131
+7 -44
pkgs/development/libraries/celt/0.5.1.nix
··· 1 - x@{builderDefsPackage 2 - , ...}: 3 - builderDefsPackage 4 - (a : 5 - let 6 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 7 - []; 1 + { callPackage, fetchurl, ... } @ args: 8 2 9 - buildInputs = map (n: builtins.getAttr n x) 10 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 11 - sourceInfo = rec { 12 - baseName="celt"; 13 - version="0.5.1.3"; 14 - name="${baseName}-${version}"; 15 - url="http://downloads.xiph.org/releases/${baseName}/${name}.tar.gz"; 16 - hash="0bkam9z5vnrxpbxkkh9kw6yzjka9di56h11iijikdd1f71l5nbpw"; 17 - }; 18 - in 19 - rec { 20 - src = a.fetchurl { 21 - url = sourceInfo.url; 22 - sha256 = sourceInfo.hash; 23 - }; 3 + callPackage ./generic.nix (args // rec{ 4 + version = "0.5.1.3"; 24 5 25 - inherit (sourceInfo) name version; 26 - inherit buildInputs; 27 - 28 - /* doConfigure should be removed if not needed */ 29 - phaseNames = ["doConfigure" "doMakeInstall"]; 30 - 31 - meta = { 32 - description = "CELT - low-delay audio codec"; 33 - maintainers = with a.lib.maintainers; 34 - [ 35 - raskin 36 - ]; 37 - platforms = with a.lib.platforms; 38 - linux; 39 - license = a.lib.licenses.free; 40 - branch = "0.5.1"; 6 + src = fetchurl { 7 + url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz"; 8 + sha256 = "0bkam9z5vnrxpbxkkh9kw6yzjka9di56h11iijikdd1f71l5nbpw"; 41 9 }; 42 - passthru = { 43 - updateInfo = { 44 - downloadPage = "http://www.celt-codec.org/downloads/"; 45 - }; 46 - }; 47 - }) x 10 + })
+7 -44
pkgs/development/libraries/celt/0.7.nix
··· 1 - x@{builderDefsPackage 2 - , ...}: 3 - builderDefsPackage 4 - (a : 5 - let 6 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 7 - []; 1 + { callPackage, fetchurl, ... } @ args: 8 2 9 - buildInputs = map (n: builtins.getAttr n x) 10 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 11 - sourceInfo = rec { 12 - baseName="celt"; 13 - version="0.7.1"; 14 - name="${baseName}-${version}"; 15 - url="http://downloads.xiph.org/releases/${baseName}/${name}.tar.gz"; 16 - hash="93f0e2dfb59021b19e69dc0dee855eb89f19397db1dea0d0d6f9329cff933066"; 17 - }; 18 - in 19 - rec { 20 - src = a.fetchurl { 21 - url = sourceInfo.url; 22 - sha256 = sourceInfo.hash; 23 - }; 3 + callPackage ./generic.nix (args // rec{ 4 + version = "0.7.1"; 24 5 25 - inherit (sourceInfo) name version; 26 - inherit buildInputs; 27 - 28 - /* doConfigure should be removed if not needed */ 29 - phaseNames = ["doConfigure" "doMakeInstall"]; 30 - 31 - meta = { 32 - description = "CELT - low-delay audio codec"; 33 - maintainers = with a.lib.maintainers; 34 - [ 35 - raskin 36 - ]; 37 - platforms = with a.lib.platforms; 38 - linux; 39 - license = a.lib.licenses.free; 40 - branch = "0.7"; 6 + src = fetchurl { 7 + url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz"; 8 + sha256 = "0rihjgzrqcprsv8a1pmiglwik7xqbs2yw3fwd6gb28chnpgy5w4k"; 41 9 }; 42 - passthru = { 43 - updateInfo = { 44 - downloadPage = "http://www.celt-codec.org/downloads/"; 45 - }; 46 - }; 47 - }) x 10 + })
+7 -43
pkgs/development/libraries/celt/default.nix
··· 1 - x@{builderDefsPackage 2 - , ...}: 3 - builderDefsPackage 4 - (a : 5 - let 6 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 7 - []; 8 - 9 - buildInputs = map (n: builtins.getAttr n x) 10 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 11 - sourceInfo = rec { 12 - baseName="celt"; 13 - version="0.11.3"; 14 - name="${baseName}-${version}"; 15 - url="http://downloads.xiph.org/releases/${baseName}/${name}.tar.gz"; 16 - hash="0dh893wqbh0q4a0x1xyqryykmnhpv7mkblpch019s04a99fq2r3y"; 17 - }; 18 - in 19 - rec { 20 - src = a.fetchurl { 21 - url = sourceInfo.url; 22 - sha256 = sourceInfo.hash; 23 - }; 24 - 25 - inherit (sourceInfo) name version; 26 - inherit buildInputs; 1 + { callPackage, fetchurl, ... } @ args: 27 2 28 - /* doConfigure should be removed if not needed */ 29 - phaseNames = ["doConfigure" "doMakeInstall"]; 3 + callPackage ./generic.nix (args // rec{ 4 + version = "0.11.3"; 30 5 31 - meta = { 32 - description = "Low-delay audio codec"; 33 - maintainers = with a.lib.maintainers; 34 - [ 35 - raskin 36 - ]; 37 - platforms = with a.lib.platforms; 38 - linux; 39 - license = a.lib.licenses.free; 6 + src = fetchurl { 7 + url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz"; 8 + sha256 = "0dh893wqbh0q4a0x1xyqryykmnhpv7mkblpch019s04a99fq2r3y"; 40 9 }; 41 - passthru = { 42 - updateInfo = { 43 - downloadPage = "http://www.celt-codec.org/downloads/"; 44 - }; 45 - }; 46 - }) x 10 + })
+23
pkgs/development/libraries/celt/generic.nix
··· 1 + { stdenv, version, src 2 + , liboggSupport ? true, libogg ? null # if disabled only the library will be built 3 + , ... 4 + }: 5 + 6 + # The celt codec has been deprecated and is now a part of the opus codec 7 + 8 + stdenv.mkDerivation rec { 9 + name = "celt-${version}"; 10 + 11 + inherit src; 12 + 13 + buildInputs = [] 14 + ++ stdenv.lib.optional liboggSupport libogg; 15 + 16 + meta = with stdenv.lib; { 17 + description = "Ultra-low delay audio codec"; 18 + homepage = http://www.celt-codec.org/; 19 + license = licenses.bsd2; 20 + maintainers = with maintainers; [ codyopel raskin ]; 21 + platform = platforms.unix; 22 + }; 23 + }