From b96db456f5f662ede17d4ec9301f2e174cde0876 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Wed, 6 May 2020 13:27:04 +0800 Subject: [PATCH] mu: allow configuring the BatchSize --- pkgs/tools/networking/mu/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/mu/default.nix b/pkgs/tools/networking/mu/default.nix index c103637c685..79c314f9860 100644 --- a/pkgs/tools/networking/mu/default.nix +++ b/pkgs/tools/networking/mu/default.nix @@ -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 ];