zoxide: 0.9.6 -> 0.9.7 (#380745)
[NixPkgs.git] / pkgs / servers / dict / dictd-wordnet.nix
blob3fa2744ff2128dfded237ef701539a9ac528a745
2   lib,
3   stdenv,
4   python3,
5   wordnet,
6   writeScript,
7   libfaketime,
8 }:
10 stdenv.mkDerivation rec {
11   version = "542";
12   pname = "dict-db-wordnet";
14   buildInputs = [
15     python3
16     wordnet
17     libfaketime
18   ];
19   convert = ./wordnet_structures.py;
21   builder = writeScript "builder.sh" ''
22     . ${stdenv}/setup
23     mkdir -p $out/share/dictd/
24     cd $out/share/dictd
26     for i in ${wordnet}/dict/data.*; do
27       DATA="$DATA `echo $i | sed -e s,data,index,` $i";
28     done
30     source_date=$(date --utc --date=@$SOURCE_DATE_EPOCH "+%F %T")
31     faketime -f "$source_date" python ${convert} $DATA
32     echo en_US.UTF-8 > locale
33   '';
35   meta = {
36     description = "dictd-compatible version of WordNet";
38     longDescription = ''
39       WordNet® is a large lexical database of English. This package makes
40       the wordnet data available to dictd and by extension for lookup with
41       the dict command.
42     '';
44     homepage = "https://wordnet.princeton.edu/";
46     maintainers = [ ];
47     platforms = lib.platforms.all;
48   };