Merge pull request #12525 from knupfer/ngx_brotli

add nginxModules.brotli

+96
+36
pkgs/development/libraries/libbrotli/default.nix
···
··· 1 + {stdenv, fetchFromGitHub, autoconf, automake, libtool, brotliUnstable}: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "libbrotli-20160120"; 5 + version = "53d53e8"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "bagder"; 9 + repo = "libbrotli"; 10 + rev = "53d53e8d9c0d37398d37bac2e7a7aa20b0025e9e"; 11 + sha256 = "10r4nx6n1r54f5cjck5mmmsj7bkasnmmz7m84imhil45q73kzd4m"; 12 + }; 13 + 14 + buildInputs = [autoconf automake libtool]; 15 + preConfigure = '' 16 + cp -r ${brotliUnstable.src}/* brotli/ 17 + chmod -R +700 brotli 18 + mkdir m4 19 + autoreconf --install --force --symlink 20 + ''; 21 + 22 + meta = with stdenv.lib; { 23 + description = "Meta project to build libraries from the brotli source code"; 24 + longDescription = '' 25 + Wrapper scripts and code around the brotli code base. 26 + Builds libraries out of the brotli decode and encode sources. Uses autotools. 27 + 'brotlidec' is the library for decoding, decompression 28 + 'brotlienc' is the library for encoding, compression 29 + ''; 30 + 31 + homepage = https://github.com/bagder/libbrotli; 32 + license = licenses.mit; 33 + platforms = platforms.all; 34 + maintainers = []; 35 + }; 36 + }
+10
pkgs/servers/http/nginx/modules.nix
··· 1 { fetchFromGitHub, pkgs }: 2 3 { 4 rtmp = { 5 src = fetchFromGitHub { 6 owner = "arut";
··· 1 { fetchFromGitHub, pkgs }: 2 3 { 4 + brotli = { 5 + src = fetchFromGitHub { 6 + owner = "google"; 7 + repo = "ngx_brotli"; 8 + rev = "788615eab7c5e0a984278113c55248305620df14"; 9 + sha256 = "02514bbjdhm9m38vljdh626d3c1783jxsxawv5c6bzblwmb8xgvf"; 10 + }; 11 + inputs = [ pkgs.libbrotli ]; 12 + }; 13 + 14 rtmp = { 15 src = fetchFromGitHub { 16 owner = "arut";
+46
pkgs/tools/compression/brotli/unstable.nix
···
··· 1 + { stdenv, fetchFromGitHub }: 2 + 3 + # ?TODO: there's also python lib in there 4 + 5 + stdenv.mkDerivation rec { 6 + name = "brotli-20160112"; 7 + version = "bed93862"; 8 + 9 + src = fetchFromGitHub { 10 + owner = "google"; 11 + repo = "brotli"; 12 + rev = "bed93862608d4d232ebe6d229f04e48399775e8b"; 13 + sha256 = "0g94kqh984qkbqbj4fpkkyji9wnbrb9cs32r9d6niw1sqfnfkd6f"; 14 + }; 15 + 16 + preConfigure = "cd tools"; 17 + 18 + # Debian installs "brotli" instead of "bro" but let's keep upstream choice for now. 19 + installPhase = '' 20 + mkdir -p "$out/bin" 21 + mv ./bro "$out/bin/" 22 + ''; 23 + 24 + meta = with stdenv.lib; { 25 + inherit (src.meta) homepage; 26 + 27 + description = "A generic-purpose lossless compression algorithm and tool"; 28 + 29 + longDescription = 30 + '' Brotli is a generic-purpose lossless compression algorithm that 31 + compresses data using a combination of a modern variant of the LZ77 32 + algorithm, Huffman coding and 2nd order context modeling, with a 33 + compression ratio comparable to the best currently available 34 + general-purpose compression methods. It is similar in speed with 35 + deflate but offers more dense compression. 36 + 37 + The specification of the Brotli Compressed Data Format is defined 38 + in the following internet draft: 39 + http://www.ietf.org/id/draft-alakuijala-brotli 40 + ''; 41 + 42 + license = licenses.mit; 43 + maintainers = []; 44 + platforms = platforms.all; 45 + }; 46 + }
+4
pkgs/top-level/all-packages.nix
··· 1228 1229 brotli = callPackage ../tools/compression/brotli { }; 1230 1231 biosdevname = callPackage ../tools/networking/biosdevname { }; 1232 1233 checkbashism = callPackage ../development/tools/misc/checkbashisms { };
··· 1228 1229 brotli = callPackage ../tools/compression/brotli { }; 1230 1231 + brotliUnstable = callPackage ../tools/compression/brotli/unstable.nix { }; 1232 + 1233 + libbrotli = callPackage ../development/libraries/libbrotli { }; 1234 + 1235 biosdevname = callPackage ../tools/networking/biosdevname { }; 1236 1237 checkbashism = callPackage ../development/tools/misc/checkbashisms { };