nixpkgs/pkgs/servers/dict/dictd-wordnet.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
878 B
Nix
Raw Normal View History

2021-03-25 11:16:29 +00:00
{lib, stdenv, python2, wordnet, writeScript}:
stdenv.mkDerivation rec {
version = "542";
pname = "dict-db-wordnet";
2021-03-25 11:16:29 +00:00
buildInputs = [python2 wordnet];
convert = ./wordnet_structures.py;
builder = writeScript "builder.sh" ''
. ${stdenv}/setup
mkdir -p $out/share/dictd/
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 = "https://wordnet.princeton.edu/";
maintainers = [ ];
2021-01-15 07:07:56 +00:00
platforms = lib.platforms.all;
};
}