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