Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions pkgs/tools/compression/brotli/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, stdenv
, fetchFromGitHub
, cmake
, fetchpatch
, staticOnly ? stdenv.hostPlatform.isStatic
, testers
}:
Expand All @@ -11,24 +10,17 @@

stdenv.mkDerivation (finalAttrs: {
pname = "brotli";
version = "1.0.9";
version = "1.1.0";

src = fetchFromGitHub {
owner = "google";
repo = "brotli";
rev = "v${finalAttrs.version}";
sha256 = "z6Dhrabav1MDQ4rAcXaDv0aN+qOoh9cvoXZqEWBB13c=";
hash = "sha256-MvceRcle2dSkkucC2PlsCizsIf8iv95d8Xjqew266wc=";
};

nativeBuildInputs = [ cmake ];

patches = lib.optional staticOnly (fetchpatch {
# context from https://github.com/google/brotli/pull/655
# updated patch from https://github.com/google/brotli/pull/655
url = "https://github.com/google/brotli/commit/47a554804ceabb899ae924aaee54df806053d0d1.patch";
sha256 = "sOeXNVsCaBSD9i82GRUDrkyreGeQ7qaJWjjy/uLL0/0=";
});

cmakeFlags = lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";

outputs = [ "out" "dev" "lib" ];
Expand All @@ -37,17 +29,6 @@ stdenv.mkDerivation (finalAttrs: {

checkTarget = "test";

# 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?)
prePatch = ''
rm BUILD

# Upstream fixed this reference to runtime-path after the release
# and with this references g++ complains about invalid option -R
sed -i 's/ -R''${libdir}//' scripts/libbrotli*.pc.in
cat scripts/libbrotli*.pc.in
'';

# Don't bother with "man" output for now,
# it currently only makes the manpages hard to use.
postInstall = ''
Expand Down