···11-{ lib, stdenv, fetchFromGitHub, cmake, fetchpatch
11+{ lib
22+, stdenv
33+, fetchFromGitHub
44+, cmake
55+, fetchpatch
26, staticOnly ? stdenv.hostPlatform.isStatic
37}:
48···1115 src = fetchFromGitHub {
1216 owner = "google";
1317 repo = "brotli";
1414- rev = "v" + version;
1818+ rev = "v${version}";
1519 sha256 = "z6Dhrabav1MDQ4rAcXaDv0aN+qOoh9cvoXZqEWBB13c=";
1620 };
1721···2428 sha256 = "sOeXNVsCaBSD9i82GRUDrkyreGeQ7qaJWjjy/uLL0/0=";
2529 });
26302727- cmakeFlags = []
2828- ++ lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
3131+ cmakeFlags = lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
29323033 outputs = [ "out" "dev" "lib" ];
3134···3639 # This breaks on Darwin because our cmake hook tries to make a build folder
3740 # and the wonderful bazel BUILD file is already there (yay case-insensitivity?)
3841 prePatch = ''
3939- rm BUILD
4242+ rm BUILD
40434141- # Upstream fixed this reference to runtime-path after the release
4242- # and with this references g++ complains about invalid option -R
4343- sed -i 's/ -R''${libdir}//' scripts/libbrotli*.pc.in
4444- cat scripts/libbrotli*.pc.in
4545- '';
4444+ # Upstream fixed this reference to runtime-path after the release
4545+ # and with this references g++ complains about invalid option -R
4646+ sed -i 's/ -R''${libdir}//' scripts/libbrotli*.pc.in
4747+ cat scripts/libbrotli*.pc.in
4848+ '';
46494750 # Don't bother with "man" output for now,
4851 # it currently only makes the manpages hard to use.
···5356 '';
54575558 meta = with lib; {
5656- inherit (src.meta) homepage;
5757-5959+ homepage = "https://github.com/google/brotli";
5860 description = "A generic-purpose lossless compression algorithm and tool";
5959-6061 longDescription =
6162 '' Brotli is a generic-purpose lossless compression algorithm that
6263 compresses data using a combination of a modern variant of the LZ77
···6970 in the following internet draft:
7071 http://www.ietf.org/id/draft-alakuijala-brotli
7172 '';
7272-7373 license = licenses.mit;
7474 maintainers = with maintainers; [ freezeboy ];
7575 platforms = platforms.all;