about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text/mecab/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/text/mecab/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/text/mecab/default.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/text/mecab/default.nix b/nixpkgs/pkgs/tools/text/mecab/default.nix
new file mode 100644
index 000000000000..c579dcb8a175
--- /dev/null
+++ b/nixpkgs/pkgs/tools/text/mecab/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, mecab-ipadic }:
+
+let
+  mecab-base = import ./base.nix { inherit fetchurl; };
+in
+stdenv.mkDerivation (mecab-base // {
+    name = "mecab-${mecab-base.version}";
+
+    postInstall = ''
+      sed -i 's|^dicdir = .*$|dicdir = ${mecab-ipadic}|' "$out/etc/mecabrc"
+    '';
+
+    meta = with lib; {
+      description = "Japanese morphological analysis system";
+      homepage = "http://taku910.github.io/mecab/";
+      license = licenses.bsd3;
+      platforms = platforms.unix;
+      maintainers = with maintainers; [ auntie ];
+    };
+})