about summary refs log tree commit diff
path: root/pkgs/servers/dict/wiktionary/default.nix
blob: 3c18056821d8fa696eedc05f17773aa928a9c50c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ lib, stdenv, fetchurl, python, dict, glibcLocales }:

stdenv.mkDerivation rec {
  version = "20210201";
  pname = "dict-db-wiktionary";

  src = fetchurl {
    url = "https://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2";
    sha256 = "0dc34cbadsg0f6lhfcyx0np7zjnlg6837piqhlvnn0b45xnzn0cs";
  };

  convert = ./wiktionary2dict.py;
  buildInputs = [ python dict glibcLocales ];
  builder = ./builder.sh;

  meta = with lib; {
    description = "DICT version of English Wiktionary";
    homepage = "http://en.wiktionary.org/";
    maintainers = with maintainers; [ qyliss ];
    platforms = platforms.all;
    license = with licenses; [ cc-by-sa-30 fdl11Plus ];
  };
}