diff --git a/pkgs/development/libraries/enchant/2.x.nix b/pkgs/development/libraries/enchant/2.x.nix index 2fa7aec062f3..cb136788a6b1 100644 --- a/pkgs/development/libraries/enchant/2.x.nix +++ b/pkgs/development/libraries/enchant/2.x.nix @@ -9,6 +9,11 @@ , hspell , nuspell , unittest-cpp + +, withHspell ? true +, withAspell ? true +, withHunspell ? true +, withNuspell ? true }: stdenv.mkDerivation rec { @@ -31,7 +36,9 @@ stdenv.mkDerivation rec { buildInputs = [ glib + ] ++ lib.optionals withHunspell [ hunspell + ] ++ lib.optionals withNuspell [ nuspell ]; @@ -40,8 +47,9 @@ stdenv.mkDerivation rec { ]; # libtool puts these to .la files - propagatedBuildInputs = [ + propagatedBuildInputs = lib.optionals withHspell [ hspell + ] ++ lib.optionals withAspell [ aspell ]; @@ -51,10 +59,10 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-relocatable" # needed for tests - "--with-aspell" - "--with-hspell" - "--with-hunspell" - "--with-nuspell" + (lib.withFeature withAspell "aspell") + (lib.withFeature withHspell "hspell") + (lib.withFeature withHunspell "hunspell") + (lib.withFeature withNuspell "nuspell") ]; meta = with lib; {