git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #12525 from knupfer/ngx_brotli

add nginxModules.brotli

commitdcfca100ec57b0b8a2af5dbaec7e0a41a76253ac authorLuca Bruno <lucabru@src.gnome.org> dateFri 11 Mar 2016, 11:05 (11 years ago) parent9f578af8e604f7
4 files changed+96
pkgs/development/libraries/libbrotli/default.nix+36 pkgs/servers/http/nginx/modules.nix+10 pkgs/tools/compression/brotli/unstable.nix+46 pkgs/top-level/all-packages.nix+4
pkgs/development/libraries/libbrotli/default.nixnew file+36
@@ -0,0 +1,36 @@
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+}
pkgs/servers/http/nginx/modules.nix+10
@@ -1,6 +1,16 @@
11{ fetchFromGitHub, pkgs }:
22
33{
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+
414 rtmp = {
515 src = fetchFromGitHub {
616 owner = "arut";
pkgs/tools/compression/brotli/unstable.nixnew file+46
@@ -0,0 +1,46 @@
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+}
pkgs/top-level/all-packages.nix+4
@@ -1228,6 +1228,10 @@ let
12281228
12291229 brotli = callPackage ../tools/compression/brotli { };
12301230
1231+ brotliUnstable = callPackage ../tools/compression/brotli/unstable.nix { };
1232+
1233+ libbrotli = callPackage ../development/libraries/libbrotli { };
1234+
12311235 biosdevname = callPackage ../tools/networking/biosdevname { };
12321236
12331237 checkbashism = callPackage ../development/tools/misc/checkbashisms { };