mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
wiktionary: remove builder.sh
This commit is contained in:
parent
02732ba0a4
commit
516627915f
2 changed files with 15 additions and 13 deletions
|
@ -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 }:
|
||||
|
||||
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 ];
|
||||
|
|
Loading…
Reference in a new issue