diff options
Diffstat (limited to 'pkgs/development/libraries/enchant/2.x.nix')
-rw-r--r-- | pkgs/development/libraries/enchant/2.x.nix | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/pkgs/development/libraries/enchant/2.x.nix b/pkgs/development/libraries/enchant/2.x.nix index 2fa7aec062f36..69cab2ca5b61c 100644 --- a/pkgs/development/libraries/enchant/2.x.nix +++ b/pkgs/development/libraries/enchant/2.x.nix @@ -9,8 +9,18 @@ , hspell , nuspell , unittest-cpp + +, withHspell ? true +, withAspell ? true +, withHunspell ? true +, withNuspell ? true +, withAppleSpell ? stdenv.isDarwin + +, Cocoa }: +assert withAppleSpell -> stdenv.isDarwin; + stdenv.mkDerivation rec { pname = "enchant"; version = "2.6.9"; @@ -31,8 +41,12 @@ stdenv.mkDerivation rec { buildInputs = [ glib + ] ++ lib.optionals withHunspell [ hunspell + ] ++ lib.optionals withNuspell [ nuspell + ] ++ lib.optionals withAppleSpell [ + Cocoa ]; checkInputs = [ @@ -40,8 +54,9 @@ stdenv.mkDerivation rec { ]; # libtool puts these to .la files - propagatedBuildInputs = [ + propagatedBuildInputs = lib.optionals withHspell [ hspell + ] ++ lib.optionals withAspell [ aspell ]; @@ -51,10 +66,11 @@ 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") + (lib.withFeature withAppleSpell "applespell") ]; meta = with lib; { |