mu: allow configuring the BatchSize

This commit is contained in:
Peter Hoeg 2020-05-06 13:27:04 +08:00
parent b290ef6911
commit b96db456f5
1 changed files with 7 additions and 1 deletions

View File

@ -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 ];