nerdfonts: fix wrong attribute name in error message (#364463)
[NixPkgs.git] / pkgs / servers / dict / wiktionary / default.nix
blobea3ba3bfd8249b8181759985a2ed07e7f6480a06
2   lib,
3   stdenv,
4   fetchurl,
5   python3,
6   dict,
7   glibcLocales,
8   libfaketime,
9 }:
11 stdenv.mkDerivation rec {
12   pname = "dict-db-wiktionary";
13   version = "20240901";
15   src = fetchurl {
16     url = "https://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2";
17     sha256 = "f37e899a9091a1b01137c7b0f3d58813edf3039e9e94ae656694c88859bbe756";
18   };
20   nativeBuildInputs = [
21     python3
22     dict
23     glibcLocales
24     libfaketime
25   ];
27   dontUnpack = true;
29   installPhase = ''
30     mkdir -p $out/share/dictd/
31     cd $out/share/dictd
33     source_date=$(date --utc --date=@$SOURCE_DATE_EPOCH "+%F %T")
34     faketime -f "$source_date" ${python3.interpreter} -O ${./wiktionary2dict.py} "${src}"
35     faketime -f "$source_date" dictzip wiktionary-en.dict
36     echo en_US.UTF-8 > locale
37   '';
39   passthru.updateScript = ./update.sh;
41   meta = with lib; {
42     description = "DICT version of English Wiktionary";
43     homepage = "https://en.wiktionary.org/";
44     maintainers = with maintainers; [ qyliss ];
45     platforms = platforms.all;
46     license = with licenses; [
47       cc-by-sa-30
48       fdl11Plus
49     ];
50   };