enchant: enable disabling providers

This commit is contained in:
Alan Pearce 2024-05-10 16:43:22 +02:00
parent 0c9055e823
commit 5141183658

View File

@ -9,6 +9,11 @@
, hspell , hspell
, nuspell , nuspell
, unittest-cpp , unittest-cpp
, withHspell ? true
, withAspell ? true
, withHunspell ? true
, withNuspell ? true
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -31,7 +36,9 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
glib glib
] ++ lib.optionals withHunspell [
hunspell hunspell
] ++ lib.optionals withNuspell [
nuspell nuspell
]; ];
@ -40,8 +47,9 @@ stdenv.mkDerivation rec {
]; ];
# libtool puts these to .la files # libtool puts these to .la files
propagatedBuildInputs = [ propagatedBuildInputs = lib.optionals withHspell [
hspell hspell
] ++ lib.optionals withAspell [
aspell aspell
]; ];
@ -51,10 +59,10 @@ stdenv.mkDerivation rec {
configureFlags = [ configureFlags = [
"--enable-relocatable" # needed for tests "--enable-relocatable" # needed for tests
"--with-aspell" (lib.withFeature withAspell "aspell")
"--with-hspell" (lib.withFeature withHspell "hspell")
"--with-hunspell" (lib.withFeature withHunspell "hunspell")
"--with-nuspell" (lib.withFeature withNuspell "nuspell")
]; ];
meta = with lib; { meta = with lib; {