about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text/kakasi/default.nix
blob: d2cf1f701ee9b1ef920fc3834612c22a4fe831bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, stdenv, fetchurl, libiconv }:

stdenv.mkDerivation rec {
  pname = "kakasi";
  version = "2.3.6";

  buildInputs = lib.optional stdenv.isDarwin [ libiconv ];

  meta = with lib; {
    description = "Kanji Kana Simple Inverter";
    longDescription = ''
      KAKASI is the language processing filter to convert Kanji
      characters to Hiragana, Katakana or Romaji and may be
      helpful to read Japanese documents.
    '';
    homepage    = "http://kakasi.namazu.org/";
    license     = licenses.gpl2Plus;
    platforms   = platforms.unix;
  };

  src = fetchurl {
    url = "http://kakasi.namazu.org/stable/kakasi-${version}.tar.xz";
    sha256 = "1qry3xqb83pjgxp3my8b1sy77z4f0893h73ldrvdaky70cdppr9f";
  };

  postPatch = ''
    for a in tests/kakasi-* ; do
      substituteInPlace $a \
        --replace "/bin/echo" echo
    done
  '';

  doCheck = false; # fails 1 of 6 tests

}