Hi,
the attached patch makes it possible to install wordnet data as a dictd
dictionary.
Petr
Index: pkgs/applications/misc/wordnet/dictd.nix
===================================================================
--- pkgs/applications/misc/wordnet/dictd.nix (revision 0)
+++ pkgs/applications/misc/wordnet/dictd.nix (working copy)
@@ -0,0 +1,37 @@
+{stdenv, fetchsvn, python, wordnet}:
+
+stdenv.mkDerivation rec {
+ version = "542";
+ name = "dict-db-wordnet-${version}";
+ src = fetchsvn {
+ url = "http://svn.memespace.net/svn/hobby/trivialities/wordnet_tools";
+ sha256 = "32477cf239540d8910e2745a16ce0fbd0bc47368b04415ae0b255af12c83a5f2";
+ };
+
+ buildInputs = [python wordnet];
+
+ installPhase = ''
+ ensureDir $out/share/dictd/
+ srcdir=`pwd`
+ cd $out/share/dictd
+ for i in ${wordnet}/dict/data.*; do
+ DATA="$DATA `echo $i | sed -e s,data,index,` $i";
+ done
+ python $srcdir/wordnet_structures.py $DATA
+ echo en_US.UTF-8 > locale
+ '';
+
+ meta = {
+ description = "dictd-compatible version of WordNet";
+
+ longDescription =
+ '' WordNet® is a large lexical database of English. This package makes
+ the wordnet data available to dictd and by extension for lookup with
+ the dict command. '';
+
+ homepage = http://wordnet.princeton.edu/;
+
+ maintainers = [ stdenv.lib.maintainers.mornfall ];
+ platforms = stdenv.lib.platforms.gnu; # arbitrary choice
+ };
+}
--
id' Ash = Ash; id' Dust = Dust; id' _ = undefined
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev