3
0
Fork 0
forked from mirrors/nixpkgs

brotli: cleanup

This commit is contained in:
Sandro Jäckel 2021-07-21 13:34:51 +02:00
parent 4bc05c6a30
commit 0a97ad6827
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,4 +1,8 @@
{ lib, stdenv, fetchFromGitHub, cmake, fetchpatch { lib
, stdenv
, fetchFromGitHub
, cmake
, fetchpatch
, staticOnly ? stdenv.hostPlatform.isStatic , staticOnly ? stdenv.hostPlatform.isStatic
}: }:
@ -11,7 +15,7 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "google"; owner = "google";
repo = "brotli"; repo = "brotli";
rev = "v" + version; rev = "v${version}";
sha256 = "z6Dhrabav1MDQ4rAcXaDv0aN+qOoh9cvoXZqEWBB13c="; sha256 = "z6Dhrabav1MDQ4rAcXaDv0aN+qOoh9cvoXZqEWBB13c=";
}; };
@ -24,8 +28,7 @@ stdenv.mkDerivation rec {
sha256 = "sOeXNVsCaBSD9i82GRUDrkyreGeQ7qaJWjjy/uLL0/0="; sha256 = "sOeXNVsCaBSD9i82GRUDrkyreGeQ7qaJWjjy/uLL0/0=";
}); });
cmakeFlags = [] cmakeFlags = lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
++ lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
outputs = [ "out" "dev" "lib" ]; outputs = [ "out" "dev" "lib" ];
@ -36,13 +39,13 @@ stdenv.mkDerivation rec {
# This breaks on Darwin because our cmake hook tries to make a build folder # This breaks on Darwin because our cmake hook tries to make a build folder
# and the wonderful bazel BUILD file is already there (yay case-insensitivity?) # and the wonderful bazel BUILD file is already there (yay case-insensitivity?)
prePatch = '' prePatch = ''
rm BUILD rm BUILD
# Upstream fixed this reference to runtime-path after the release # Upstream fixed this reference to runtime-path after the release
# and with this references g++ complains about invalid option -R # and with this references g++ complains about invalid option -R
sed -i 's/ -R''${libdir}//' scripts/libbrotli*.pc.in sed -i 's/ -R''${libdir}//' scripts/libbrotli*.pc.in
cat scripts/libbrotli*.pc.in cat scripts/libbrotli*.pc.in
''; '';
# Don't bother with "man" output for now, # Don't bother with "man" output for now,
# it currently only makes the manpages hard to use. # it currently only makes the manpages hard to use.
@ -53,10 +56,8 @@ stdenv.mkDerivation rec {
''; '';
meta = with lib; { meta = with lib; {
inherit (src.meta) homepage; homepage = "https://github.com/google/brotli";
description = "A generic-purpose lossless compression algorithm and tool"; description = "A generic-purpose lossless compression algorithm and tool";
longDescription = longDescription =
'' Brotli is a generic-purpose lossless compression algorithm that '' Brotli is a generic-purpose lossless compression algorithm that
compresses data using a combination of a modern variant of the LZ77 compresses data using a combination of a modern variant of the LZ77
@ -69,7 +70,6 @@ stdenv.mkDerivation rec {
in the following internet draft: in the following internet draft:
http://www.ietf.org/id/draft-alakuijala-brotli http://www.ietf.org/id/draft-alakuijala-brotli
''; '';
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ freezeboy ]; maintainers = with maintainers; [ freezeboy ];
platforms = platforms.all; platforms = platforms.all;