Commit cf2e3654 authored by Leonard-Orlando Jonathan Menzel's avatar Leonard-Orlando Jonathan Menzel
Browse files

mkp224o: add optional regex support and batch size parameters

parent 5c46f3bd
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -4,6 +4,9 @@
  fetchFromGitHub,
  autoreconfHook,
  libsodium,
  pcre2,
  regexSupport ? false,
  batchSize ? 2048,
}:

stdenv.mkDerivation rec {
@@ -53,10 +56,14 @@ stdenv.mkDerivation rec {
      ''
        install -D ${
          stdenv.mkDerivation {
            name = "mkp224o-${suffix}-${version}";
            inherit version src configureFlags;
            pname = "mkp224o-${suffix}";
            inherit version src;
            configureFlags =
              configureFlags
              ++ [ "--enable-batchnum=${builtins.toString batchSize}" ]
              ++ lib.optionals regexSupport [ "--enable-regex=yes" ];
            nativeBuildInputs = [ autoreconfHook ];
            buildInputs = [ libsodium ];
            buildInputs = [ libsodium ] ++ lib.optionals regexSupport [ pcre2 ];
            installPhase = "install -D mkp224o $out";
          }
        } $out/bin/mkp224o-${suffix}