forked from mirrors/nixpkgs
commit
f7ad0c0fd5
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.dictd;
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
|
@ -20,7 +24,7 @@ with lib;
|
||||||
|
|
||||||
DBs = mkOption {
|
DBs = mkOption {
|
||||||
type = types.listOf types.package;
|
type = types.listOf types.package;
|
||||||
default = [];
|
default = with pkgs.dictdDBs; [ wiktionary wordnet ];
|
||||||
example = [ pkgs.dictdDBs.nld2eng ];
|
example = [ pkgs.dictdDBs.nld2eng ];
|
||||||
description = ''List of databases to make available.'';
|
description = ''List of databases to make available.'';
|
||||||
};
|
};
|
||||||
|
@ -34,8 +38,8 @@ with lib;
|
||||||
|
|
||||||
config = let dictdb = pkgs.dictDBCollector { dictlist = map (x: {
|
config = let dictdb = pkgs.dictDBCollector { dictlist = map (x: {
|
||||||
name = x.name;
|
name = x.name;
|
||||||
filename = x; } ) config.services.dictd.DBs; };
|
filename = x; } ) cfg.DBs; };
|
||||||
in mkIf config.services.dictd.enable {
|
in mkIf cfg.enable {
|
||||||
|
|
||||||
# get the command line client on system path to make some use of the service
|
# get the command line client on system path to make some use of the service
|
||||||
environment.systemPackages = [ pkgs.dict ];
|
environment.systemPackages = [ pkgs.dict ];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl, callPackage }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Probably a bug in some FreeDict release files, but easier to trivially
|
# Probably a bug in some FreeDict release files, but easier to trivially
|
||||||
|
@ -82,4 +82,6 @@ in rec {
|
||||||
dbName = "mueller-names";
|
dbName = "mueller-names";
|
||||||
locale = "en_UK";
|
locale = "en_UK";
|
||||||
};
|
};
|
||||||
|
wordnet = callPackage ./dictd-wordnet.nix {};
|
||||||
|
wiktionary = callPackage ./dictd-wiktionary.nix {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{stdenv, fetchurl, python, dict, glibcLocales, writeScript}:
|
{stdenv, fetchurl, python, dict, glibcLocales, writeScript}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "20140118";
|
version = "20161001";
|
||||||
name = "dict-db-wiktionary-${version}";
|
name = "dict-db-wiktionary-${version}";
|
||||||
data = fetchurl {
|
data = fetchurl {
|
||||||
url = "http://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2";
|
url = "http://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2";
|
||||||
sha256 = "892c9fc16b248a31e2d3e42590267161c1b899b31fe923eb1ede1deb6d24cfa8";
|
sha256 = "0g3k7kxp2nzg0v56i4cz253af3aqvhn1lwkys2fnam51cn3yqm7m";
|
||||||
};
|
};
|
||||||
|
|
||||||
convert = ./wiktionary2dict.py;
|
convert = ./wiktionary2dict.py;
|
||||||
|
|
|
@ -9937,10 +9937,6 @@ in
|
||||||
|
|
||||||
dictDBCollector = callPackage ../servers/dict/dictd-db-collector.nix {};
|
dictDBCollector = callPackage ../servers/dict/dictd-db-collector.nix {};
|
||||||
|
|
||||||
dictdWiktionary = callPackage ../servers/dict/dictd-wiktionary.nix {};
|
|
||||||
|
|
||||||
dictdWordnet = callPackage ../servers/dict/dictd-wordnet.nix {};
|
|
||||||
|
|
||||||
diod = callPackage ../servers/diod { lua = lua5_1; };
|
diod = callPackage ../servers/diod { lua = lua5_1; };
|
||||||
|
|
||||||
#dnschain = callPackage ../servers/dnschain { };
|
#dnschain = callPackage ../servers/dnschain { };
|
||||||
|
|
Loading…
Reference in a new issue