mecab: init at 0.996 (#16175)
Japanese morphological analysis system, used by Anki in particular
This commit is contained in:
parent
3832ebde8b
commit
8199cda762
16
pkgs/tools/text/mecab/base.nix
Normal file
16
pkgs/tools/text/mecab/base.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ fetchurl }:
|
||||
|
||||
rec {
|
||||
version = "0.996";
|
||||
|
||||
src = fetchurl {
|
||||
url = https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7cENtOXlicTFaRUE;
|
||||
name = "mecab-0.996.tar.gz";
|
||||
sha256 = "0ncwlqxl1hdn1x4v4kr2sn1sbbcgnhdphp0lcvk74nqkhdbk4wz0";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
make
|
||||
make check
|
||||
'';
|
||||
}
|
20
pkgs/tools/text/mecab/default.nix
Normal file
20
pkgs/tools/text/mecab/default.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ 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 stdenv.lib; {
|
||||
description = "Japanese morphological analysis system";
|
||||
homepage = http://taku910.github.io/mecab/;
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ auntie ];
|
||||
};
|
||||
})
|
18
pkgs/tools/text/mecab/ipadic.nix
Normal file
18
pkgs/tools/text/mecab/ipadic.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ stdenv, fetchurl, mecab-nodic }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mecab-ipadic-${version}";
|
||||
version = "2.7.0-20070801";
|
||||
|
||||
src = fetchurl {
|
||||
url = https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7MWVlSDBCSXZMTXM;
|
||||
name = "mecab-ipadic-2.7.0-20070801.tar.gz";
|
||||
sha256 = "08rmkvj0f0x6jq0axrjw2y5nam0mavv6x77dp9v4al0wi1ym4bxn";
|
||||
};
|
||||
|
||||
buildInputs = [ mecab-nodic ];
|
||||
|
||||
configurePhase = ''
|
||||
./configure --with-dicdir="$out"
|
||||
'';
|
||||
}
|
8
pkgs/tools/text/mecab/nodic.nix
Normal file
8
pkgs/tools/text/mecab/nodic.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
let
|
||||
mecab-base = import ./base.nix { inherit fetchurl; };
|
||||
in
|
||||
stdenv.mkDerivation (mecab-base // {
|
||||
name = "mecab-nodic-${mecab-base.version}";
|
||||
})
|
@ -2426,6 +2426,16 @@ in
|
||||
|
||||
mbuffer = callPackage ../tools/misc/mbuffer { };
|
||||
|
||||
mecab =
|
||||
let
|
||||
mecab-nodic = callPackage ../tools/text/mecab/nodic.nix { };
|
||||
in
|
||||
callPackage ../tools/text/mecab {
|
||||
mecab-ipadic = callPackage ../tools/text/mecab/ipadic.nix {
|
||||
inherit mecab-nodic;
|
||||
};
|
||||
};
|
||||
|
||||
memtest86 = callPackage ../tools/misc/memtest86 { };
|
||||
|
||||
memtest86plus = callPackage ../tools/misc/memtest86+ { };
|
||||
|
Loading…
Reference in New Issue
Block a user