From 5929a5d9580fe522c5d055b49c3de846ff8b543d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Wed, 19 Oct 2016 08:31:49 +0200 Subject: [PATCH 1/4] dictdWiktionary: 20140118 -> 20161001 --- pkgs/servers/dict/dictd-wiktionary.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dict/dictd-wiktionary.nix b/pkgs/servers/dict/dictd-wiktionary.nix index 42eb3c0757e..8637d043836 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; From f59a1ee660060232891789cef8951cb9dfd9aeb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Wed, 19 Oct 2016 08:33:10 +0200 Subject: [PATCH 2/4] move dictd* in toplevel dicts to dictdDBs --- pkgs/servers/dict/dictd-db.nix | 4 +++- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/dict/dictd-db.nix b/pkgs/servers/dict/dictd-db.nix index 995a643d7ef..500ac6fd47b 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85e1336deb4..e6b5a75221d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9817,10 +9817,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 { }; From 642366d103a458079a46d3a3943c71eddbcf0cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Wed, 19 Oct 2016 08:34:41 +0200 Subject: [PATCH 3/4] nixos: dictd config location; bind to cfg --- nixos/modules/services/misc/dictd.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/dictd.nix b/nixos/modules/services/misc/dictd.nix index ef744439c3d..17c5e331547 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 @@ -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 ]; From eacb020a0c02a86f0fa89d33549a91bedca8ccfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Wed, 19 Oct 2016 08:35:37 +0200 Subject: [PATCH 4/4] nixos: dictd, make wiktionary and wordnet default dicts --- nixos/modules/services/misc/dictd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/dictd.nix b/nixos/modules/services/misc/dictd.nix index 17c5e331547..24dca15dd91 100644 --- a/nixos/modules/services/misc/dictd.nix +++ b/nixos/modules/services/misc/dictd.nix @@ -24,7 +24,7 @@ in 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.''; };