wiktionary: remove builder.sh
This commit is contained in:
parent
02732ba0a4
commit
516627915f
|
@ -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
|
|
|
@ -1,23 +1,33 @@
|
||||||
{ lib, stdenv, fetchurl, python2, dict, glibcLocales }:
|
{ lib, stdenv, fetchurl, python2, dict, glibcLocales }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "20210201";
|
|
||||||
pname = "dict-db-wiktionary";
|
pname = "dict-db-wiktionary";
|
||||||
|
version = "20210201";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2";
|
url = "https://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2";
|
||||||
sha256 = "0dc34cbadsg0f6lhfcyx0np7zjnlg6837piqhlvnn0b45xnzn0cs";
|
sha256 = "0dc34cbadsg0f6lhfcyx0np7zjnlg6837piqhlvnn0b45xnzn0cs";
|
||||||
};
|
};
|
||||||
|
|
||||||
convert = ./wiktionary2dict.py;
|
# script in nixpkgs does not support python2
|
||||||
buildInputs = [ python2 dict glibcLocales ];
|
nativeBuildInputs = [ python2 dict glibcLocales ];
|
||||||
builder = ./builder.sh;
|
|
||||||
|
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;
|
passthru.updateScript = ./update.sh;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "DICT version of English Wiktionary";
|
description = "DICT version of English Wiktionary";
|
||||||
homepage = "http://en.wiktionary.org/";
|
homepage = "https://en.wiktionary.org/";
|
||||||
maintainers = with maintainers; [ qyliss ];
|
maintainers = with maintainers; [ qyliss ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
license = with licenses; [ cc-by-sa-30 fdl11Plus ];
|
license = with licenses; [ cc-by-sa-30 fdl11Plus ];
|
||||||
|
|
Loading…
Reference in a new issue