diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-07-27 12:01:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 12:01:20 +0000 |
commit | 2692c2e4277b0b1b3b01299462f238efccba91e2 (patch) | |
tree | 9c186fa1b83585cd1f7f82351b8c8d061bfd6395 /pkgs/servers/dict/wiktionary/default.nix | |
parent | 4fc4793298c10b1d648a0f269bc44394d5171c9e (diff) | |
parent | 2431a34ffe50eeb382ea4d7f8d3984e9029d6e04 (diff) | |
download | nixpkgs-2692c2e4277b0b1b3b01299462f238efccba91e2.tar nixpkgs-2692c2e4277b0b1b3b01299462f238efccba91e2.tar.gz nixpkgs-2692c2e4277b0b1b3b01299462f238efccba91e2.tar.bz2 nixpkgs-2692c2e4277b0b1b3b01299462f238efccba91e2.tar.lz nixpkgs-2692c2e4277b0b1b3b01299462f238efccba91e2.tar.xz nixpkgs-2692c2e4277b0b1b3b01299462f238efccba91e2.tar.zst nixpkgs-2692c2e4277b0b1b3b01299462f238efccba91e2.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/servers/dict/wiktionary/default.nix')
-rw-r--r-- | pkgs/servers/dict/wiktionary/default.nix | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/servers/dict/wiktionary/default.nix b/pkgs/servers/dict/wiktionary/default.nix index 3a01120f3a6..05df86f3a78 100644 --- a/pkgs/servers/dict/wiktionary/default.nix +++ b/pkgs/servers/dict/wiktionary/default.nix @@ -1,23 +1,33 @@ { lib, stdenv, fetchurl, python2, dict, glibcLocales }: stdenv.mkDerivation rec { - version = "20210201"; pname = "dict-db-wiktionary"; + version = "20210201"; src = fetchurl { url = "https://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2"; sha256 = "0dc34cbadsg0f6lhfcyx0np7zjnlg6837piqhlvnn0b45xnzn0cs"; }; - convert = ./wiktionary2dict.py; - buildInputs = [ python2 dict glibcLocales ]; - builder = ./builder.sh; + # script in nixpkgs does not support python2 + nativeBuildInputs = [ python2 dict glibcLocales ]; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out/share/dictd/ + cd $out/share/dictd + + ${python2.interpreter} -O ${./wiktionary2dict.py} "${src}" + dictzip wiktionary-en.dict + echo en_US.UTF-8 > locale + ''; passthru.updateScript = ./update.sh; meta = with lib; { description = "DICT version of English Wiktionary"; - homepage = "http://en.wiktionary.org/"; + homepage = "https://en.wiktionary.org/"; maintainers = with maintainers; [ qyliss ]; platforms = platforms.all; license = with licenses; [ cc-by-sa-30 fdl11Plus ]; |