wiktionary: remove builder.sh

This commit is contained in:
Sandro Jäckel 2021-07-27 10:51:14 +02:00
parent 02732ba0a4
commit 516627915f
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
2 changed files with 15 additions and 13 deletions

View file

@ -1,8 +0,0 @@
source $stdenv/setup
mkdir -p $out/share/dictd/
cd $out/share/dictd
python -O "$convert" "$src"
dictzip wiktionary-en.dict
echo en_US.UTF-8 > locale

View file

@ -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 ];