···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+}