nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 cmake,
6 protobuf,
7 libiconv,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "jumanpp";
12 version = "2.0.0-rc4";
13
14 src = fetchurl {
15 url = "https://github.com/ku-nlp/jumanpp/releases/download/v${finalAttrs.version}/jumanpp-${finalAttrs.version}.tar.xz";
16 hash = "sha256-qyy0mTBrH3y8OBIVXuTHIDV+AbQIvCIA7rzhbI2b8y8=";
17 };
18
19 doCheck = true;
20
21 nativeBuildInputs = [ cmake ];
22 buildInputs = [ protobuf ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv;
23
24 postPatch = ''
25 substituteInPlace libs/pathie-cpp/CMakeLists.txt \
26 --replace-fail "cmake_minimum_required(VERSION 3.1)" "cmake_minimum_required(VERSION 3.10)"
27 '';
28
29 meta = {
30 description = "Japanese morphological analyser using a recurrent neural network language model (RNNLM)";
31 mainProgram = "jumanpp";
32 longDescription = ''
33 JUMAN++ is a new morphological analyser that considers semantic
34 plausibility of word sequences by using a recurrent neural network
35 language model (RNNLM).
36 '';
37 homepage = "https://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN++";
38 license = lib.licenses.asl20;
39 maintainers = with lib.maintainers; [ mt-caret ];
40 platforms = lib.platforms.all;
41 };
42})