Merge pull request #87063 from peterhoeg/f/mu_batch_size

mu: allow configuring the BatchSize
This commit is contained in:
Ryan Mulligan 2020-05-07 07:32:51 -07:00 committed by GitHub
commit a829af4269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,7 +1,8 @@
{ stdenv, fetchFromGitHub, sqlite, pkgconfig, autoreconfHook, pmccabe
, xapian, glib, gmime3, texinfo , emacs, guile
, gtk3, webkitgtk, libsoup, icu
, withMug ? false }:
, withMug ? false
, batchSize ? null }:
stdenv.mkDerivation rec {
pname = "mu";
@ -14,6 +15,11 @@ stdenv.mkDerivation rec {
sha256 = "1i9chd8ks1q4g5pyscsir6pw4kahkx3k8ckzbi8j3gr6jz1qzzsg";
};
postPatch = stdenv.lib.optionalString (batchSize != null) ''
sed -i lib/mu-store.cc --regexp-extended \
-e 's@(constexpr auto BatchSize).*@\1 = ${toString batchSize};@'
'';
buildInputs = [
sqlite xapian glib gmime3 texinfo emacs guile libsoup icu
] ++ stdenv.lib.optionals withMug [ gtk3 webkitgtk ];