2008-03-06 13:02:10 +01:00
|
|
|
{ builderDefs }:
|
|
|
|
|
|
|
|
let makeDictdDB = _src: _name: _subdir:
|
2008-03-06 05:39:05 +01:00
|
|
|
with builderDefs {src="";} null;
|
|
|
|
let localDefs = builderDefs (rec {
|
|
|
|
src=_src;
|
|
|
|
doInstall = FullDepEntry (''
|
|
|
|
ensureDir $out/share/dictd
|
2008-03-06 13:02:10 +01:00
|
|
|
tar xf ${src}
|
|
|
|
cp $(ls ./${_subdir}/*.{dict*,index} || true) $out/share/dictd
|
2008-03-06 05:39:05 +01:00
|
|
|
'') ["minInit" "addInputs" "defEnsureDir"];
|
|
|
|
|
|
|
|
buildInputs = [];
|
|
|
|
configureFlags = [];
|
|
|
|
}) null; /* null is a terminator for sumArgs */
|
|
|
|
in with localDefs;
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "dictd-db-${_name}";
|
|
|
|
builder = writeScript (name + "-builder")
|
|
|
|
(textClosure localDefs
|
|
|
|
[doInstall doForceShare doPropagate]);
|
|
|
|
meta = {
|
|
|
|
description = "
|
|
|
|
${name} dictionary for dictd.
|
|
|
|
";
|
|
|
|
inherit src;
|
|
|
|
};
|
|
|
|
};
|
2008-03-06 13:02:10 +01:00
|
|
|
# Probably a bug in some FreeDict release files, but easier to trivially
|
|
|
|
# work around than report. Not that it can cause any other problems..
|
|
|
|
makeDictdDBFreedict = _src: _name: makeDictdDB _src _name "{.,bin}";
|
2008-03-06 05:39:05 +01:00
|
|
|
fetchurl = (builderDefs {src="";} null).fetchurl;
|
2008-03-06 13:02:10 +01:00
|
|
|
|
2008-03-06 05:39:05 +01:00
|
|
|
in
|
2008-03-06 13:02:10 +01:00
|
|
|
|
2008-03-06 05:39:05 +01:00
|
|
|
{
|
|
|
|
nld2eng = makeDictdDBFreedict (fetchurl {
|
|
|
|
url = http://prdownloads.sourceforge.net/freedict/nld-eng.tar.gz;
|
|
|
|
sha256 = "1vhw81pphb64fzsjvpzsnnyr34ka2fxizfwilnxyjcmpn9360h07";
|
|
|
|
}) "nld-eng";
|
|
|
|
eng2nld = makeDictdDBFreedict (fetchurl {
|
|
|
|
url = http://downloads.sourceforge.net/freedict/eng-nld.tar.gz;
|
|
|
|
sha256 = "0rcg28ldykv0w2mpxc6g4rqmfs33q7pbvf68ssy1q9gpf6mz7vcl";
|
|
|
|
}) "eng-nld";
|
2008-03-06 13:02:10 +01:00
|
|
|
eng2rus = makeDictdDBFreedict (fetchurl {
|
2008-03-06 05:39:05 +01:00
|
|
|
url = http://downloads.sourceforge.net/freedict/eng-rus.tar.gz;
|
|
|
|
sha256 = "15409ivhww1wsfjr05083pv6mg10bak8v5pg1wkiqybk7ck61rry";
|
2008-03-06 13:02:10 +01:00
|
|
|
}) "eng-rus";
|
|
|
|
fra2eng = makeDictdDBFreedict (fetchurl {
|
2008-03-06 05:39:05 +01:00
|
|
|
url = http://downloads.sourceforge.net/freedict/fra-eng.tar.gz;
|
|
|
|
sha256 = "0sdd88s2zs5whiwdf3hd0s4pzzv75sdsccsrm1wxc87l3hjm85z3";
|
2008-03-06 13:02:10 +01:00
|
|
|
}) "fra-eng";
|
|
|
|
eng2fra = makeDictdDBFreedict (fetchurl {
|
2008-03-06 05:39:05 +01:00
|
|
|
url = http://downloads.sourceforge.net/freedict/eng-fra.tar.gz;
|
|
|
|
sha256 = "0fi6rrnbqnhc6lq8d0nmn30zdqkibrah0mxfg27hsn9z7alwbj3m";
|
2008-03-06 13:02:10 +01:00
|
|
|
}) "eng-fra";
|
|
|
|
mueller_eng2rus = makeDictdDB (fetchurl {
|
2008-03-06 05:39:05 +01:00
|
|
|
url = http://downloads.sourceforge.net/mueller-dict/mueller-dict-3.1.tar.gz;
|
|
|
|
sha256 = "04r5xxznvmcb8hkxqbjgfh2gxvbdd87jnhqn5gmgvxxw53zpwfmq";
|
2008-03-06 13:02:10 +01:00
|
|
|
}) "mueller-eng-rus" "mueller-dict-*/dict";
|
|
|
|
|
|
|
|
}
|