wiktionary: remove builder.sh

+15 -13
-8
pkgs/servers/dict/wiktionary/builder.sh
··· 1 - source $stdenv/setup 2 - 3 - mkdir -p $out/share/dictd/ 4 - cd $out/share/dictd 5 - 6 - python -O "$convert" "$src" 7 - dictzip wiktionary-en.dict 8 - echo en_US.UTF-8 > locale
+15 -5
pkgs/servers/dict/wiktionary/default.nix
··· 1 1 { lib, stdenv, fetchurl, python2, dict, glibcLocales }: 2 2 3 3 stdenv.mkDerivation rec { 4 - version = "20210201"; 5 4 pname = "dict-db-wiktionary"; 5 + version = "20210201"; 6 6 7 7 src = fetchurl { 8 8 url = "https://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2"; 9 9 sha256 = "0dc34cbadsg0f6lhfcyx0np7zjnlg6837piqhlvnn0b45xnzn0cs"; 10 10 }; 11 11 12 - convert = ./wiktionary2dict.py; 13 - buildInputs = [ python2 dict glibcLocales ]; 14 - builder = ./builder.sh; 12 + # script in nixpkgs does not support python2 13 + nativeBuildInputs = [ python2 dict glibcLocales ]; 14 + 15 + dontUnpack = true; 16 + 17 + installPhase = '' 18 + mkdir -p $out/share/dictd/ 19 + cd $out/share/dictd 20 + 21 + ${python2.interpreter} -O ${./wiktionary2dict.py} "${src}" 22 + dictzip wiktionary-en.dict 23 + echo en_US.UTF-8 > locale 24 + ''; 15 25 16 26 passthru.updateScript = ./update.sh; 17 27 18 28 meta = with lib; { 19 29 description = "DICT version of English Wiktionary"; 20 - homepage = "http://en.wiktionary.org/"; 30 + homepage = "https://en.wiktionary.org/"; 21 31 maintainers = with maintainers; [ qyliss ]; 22 32 platforms = platforms.all; 23 33 license = with licenses; [ cc-by-sa-30 fdl11Plus ];