2012-10-27 21:01:53 +00:00
|
|
|
{stdenv, fetchsvn, python, wordnet, writeScript}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "542";
|
|
|
|
name = "dict-db-wordnet-${version}";
|
|
|
|
|
|
|
|
buildInputs = [python wordnet];
|
|
|
|
convert = ./wordnet_structures.py;
|
|
|
|
|
|
|
|
builder = writeScript "builder.sh" ''
|
|
|
|
. ${stdenv}/setup
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/share/dictd/
|
2012-10-27 21:01:53 +00:00
|
|
|
cd $out/share/dictd
|
|
|
|
|
|
|
|
for i in ${wordnet}/dict/data.*; do
|
|
|
|
DATA="$DATA `echo $i | sed -e s,data,index,` $i";
|
|
|
|
done
|
|
|
|
|
|
|
|
python ${convert} $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/;
|
|
|
|
|
2018-01-17 05:13:23 +00:00
|
|
|
maintainers = [ ];
|
2012-10-27 21:01:53 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|