2018-07-21 02:44:44 +02:00
|
|
|
{stdenv, python, wordnet, writeScript}:
|
2012-10-27 23:01:53 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "542";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "dict-db-wordnet";
|
2012-10-27 23:01:53 +02:00
|
|
|
|
|
|
|
buildInputs = [python wordnet];
|
|
|
|
convert = ./wordnet_structures.py;
|
|
|
|
|
|
|
|
builder = writeScript "builder.sh" ''
|
|
|
|
. ${stdenv}/setup
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p $out/share/dictd/
|
2012-10-27 23:01:53 +02: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. '';
|
|
|
|
|
2018-03-25 07:04:25 +02:00
|
|
|
homepage = https://wordnet.princeton.edu/;
|
2012-10-27 23:01:53 +02:00
|
|
|
|
2018-01-17 06:13:23 +01:00
|
|
|
maintainers = [ ];
|
2012-10-27 23:01:53 +02:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|