diff --git a/nixos/modules/services/misc/dictd.nix b/nixos/modules/services/misc/dictd.nix index ef744439c3d6..24dca15dd913 100644 --- a/nixos/modules/services/misc/dictd.nix +++ b/nixos/modules/services/misc/dictd.nix @@ -2,6 +2,10 @@ with lib; +let + cfg = config.services.dictd; +in + { ###### interface @@ -20,7 +24,7 @@ with lib; DBs = mkOption { type = types.listOf types.package; - default = []; + default = with pkgs.dictdDBs; [ wiktionary wordnet ]; example = [ pkgs.dictdDBs.nld2eng ]; description = ''List of databases to make available.''; }; @@ -34,8 +38,8 @@ with lib; config = let dictdb = pkgs.dictDBCollector { dictlist = map (x: { name = x.name; - filename = x; } ) config.services.dictd.DBs; }; - in mkIf config.services.dictd.enable { + filename = x; } ) cfg.DBs; }; + in mkIf cfg.enable { # get the command line client on system path to make some use of the service environment.systemPackages = [ pkgs.dict ]; diff --git a/pkgs/servers/dict/dictd-db.nix b/pkgs/servers/dict/dictd-db.nix index 995a643d7efd..500ac6fd47bf 100644 --- a/pkgs/servers/dict/dictd-db.nix +++ b/pkgs/servers/dict/dictd-db.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, callPackage }: let # Probably a bug in some FreeDict release files, but easier to trivially @@ -82,4 +82,6 @@ in rec { dbName = "mueller-names"; locale = "en_UK"; }; + wordnet = callPackage ./dictd-wordnet.nix {}; + wiktionary = callPackage ./dictd-wiktionary.nix {}; } diff --git a/pkgs/servers/dict/dictd-wiktionary.nix b/pkgs/servers/dict/dictd-wiktionary.nix index 42eb3c0757e3..8637d043836b 100644 --- a/pkgs/servers/dict/dictd-wiktionary.nix +++ b/pkgs/servers/dict/dictd-wiktionary.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, python, dict, glibcLocales, writeScript}: stdenv.mkDerivation rec { - version = "20140118"; + version = "20161001"; name = "dict-db-wiktionary-${version}"; data = fetchurl { url = "http://dumps.wikimedia.org/enwiktionary/${version}/enwiktionary-${version}-pages-articles.xml.bz2"; - sha256 = "892c9fc16b248a31e2d3e42590267161c1b899b31fe923eb1ede1deb6d24cfa8"; + sha256 = "0g3k7kxp2nzg0v56i4cz253af3aqvhn1lwkys2fnam51cn3yqm7m"; }; convert = ./wiktionary2dict.py; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f4f06cc5c539..00dbcd96360f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9937,10 +9937,6 @@ in 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; }; #dnschain = callPackage ../servers/dnschain { };