nixpkgs/pkgs/tools/text/mecab/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
572 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, mecab-ipadic }:
let
mecab-base = import ./base.nix { inherit fetchurl; };
in
2023-09-26 17:56:22 +00:00
stdenv.mkDerivation (finalAttrs: ((mecab-base finalAttrs) // {
pname = "mecab";
2023-09-26 17:56:22 +00:00
postInstall = ''
sed -i 's|^dicdir = .*$|dicdir = ${mecab-ipadic}|' "$out/etc/mecabrc"
'';
2023-09-26 17:56:22 +00:00
meta = with lib; {
description = "Japanese morphological analysis system";
homepage = "http://taku910.github.io/mecab";
license = licenses.bsd3;
platforms = platforms.unix;
mainProgram = "mecab";
maintainers = with maintainers; [ auntie paveloom ];
};
}))