1 {lib, stdenv, python3, wordnet, writeScript, libfaketime}:
3 stdenv.mkDerivation rec {
5 pname = "dict-db-wordnet";
7 buildInputs = [python3 wordnet libfaketime];
8 convert = ./wordnet_structures.py;
10 builder = writeScript "builder.sh" ''
12 mkdir -p $out/share/dictd/
15 for i in ${wordnet}/dict/data.*; do
16 DATA="$DATA `echo $i | sed -e s,data,index,` $i";
19 source_date=$(date --utc --date=@$SOURCE_DATE_EPOCH "+%F %T")
20 faketime -f "$source_date" python ${convert} $DATA
21 echo en_US.UTF-8 > locale
25 description = "dictd-compatible version of WordNet";
28 WordNet® is a large lexical database of English. This package makes
29 the wordnet data available to dictd and by extension for lookup with
33 homepage = "https://wordnet.princeton.edu/";
36 platforms = lib.platforms.all;