From 5983f9183659142a9f59d47cf889e877318b495f Mon Sep 17 00:00:00 2001
From: Martin Bravenboer <martin.bravenboer@logicblox.com>
Date: Wed, 4 Jul 2007 01:35:29 +0000
Subject: [PATCH] A    pkgs/development/libraries/aspell/builder.sh M   
 pkgs/development/libraries/aspell/default.nix

aspell comes without any dictionaries, so if you actually want to use
it you need to install additional dictionary packages. I've added the
package for English, but obviously more should be added. Dictionaries
are installed in the prefix of aspell.

M    pkgs/top-level/all-packages.nix

aspell dict package for English needs which

added an option enableMPlayer to wrapFirefox to disable the MPlayer
plugin. It's enabled by default.


svn path=/nixpkgs/trunk/; revision=8944
---
 pkgs/development/libraries/aspell/builder.sh  | 16 ++++++++++++++++
 pkgs/development/libraries/aspell/default.nix | 12 ++++++++++--
 pkgs/top-level/all-packages.nix               |  7 +++----
 3 files changed, 29 insertions(+), 6 deletions(-)
 create mode 100644 pkgs/development/libraries/aspell/builder.sh

diff --git a/pkgs/development/libraries/aspell/builder.sh b/pkgs/development/libraries/aspell/builder.sh
new file mode 100644
index 00000000000..af1c5406675
--- /dev/null
+++ b/pkgs/development/libraries/aspell/builder.sh
@@ -0,0 +1,16 @@
+source $stdenv/setup
+genericBuild
+
+# dictionaries search for aspell and prezip-bin
+export PATH=$out/bin:$PATH
+mkdir dict-tmp
+cd dict-tmp
+for d in $dictionaries; do
+  tar jxvf $d
+  cd aspell6-*
+  ./configure
+  make
+  make install
+  rm -rf aspell6-*
+  cd ..
+done
diff --git a/pkgs/development/libraries/aspell/default.nix b/pkgs/development/libraries/aspell/default.nix
index 52f7818428f..d259efcc8c0 100644
--- a/pkgs/development/libraries/aspell/default.nix
+++ b/pkgs/development/libraries/aspell/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, perl}:
+{stdenv, fetchurl, perl, which}:
 
 stdenv.mkDerivation {
   name = "aspell-0.60.5";
@@ -6,6 +6,14 @@ stdenv.mkDerivation {
     url = ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.5.tar.gz;
     md5 = "17fd8acac6293336bcef44391b71e337";
   };
+  builder = ./builder.sh;
 
-  buildInputs = [perl];
+  buildInputs = [perl which];
+  dictionaries =
+    let en = fetchurl {
+          url = ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-6.0-0.tar.bz2;
+          md5 = "16449e0a266e1ecc526b2f3cd39d4bc2";
+        };
+    in
+      [ en ];
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c36d7cd3718..027ac21c6c5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1223,7 +1223,7 @@ rec {
   };
 
   aspell = import ../development/libraries/aspell {
-    inherit fetchurl stdenv perl;
+    inherit fetchurl stdenv perl which;
   };
 
   audiofile = import ../development/libraries/audiofile {
@@ -3135,12 +3135,11 @@ rec {
 
   wrapFirefox = firefox: import ../applications/networking/browsers/firefox-wrapper {
     inherit stdenv firefox;
-    plugins = [
-      MPlayerPlugin
-    ]
+    plugins = []
     ++ lib.optional (system == "i686-linux") flashplayer
     # RealPlayer is disabled by default for legal reasons.
     ++ lib.optional (system != "i686-linux" && getConfig ["firefox" "enableRealPlayer"] false) RealPlayer
+    ++ lib.optional (getConfig ["firefox" "enableMPlayer"] true) MPlayerPlugin
     ++ lib.optional (supportsJDK && jrePlugin ? mozillaPlugin) jrePlugin;
   };