cdb: fix -Werror messages
[NixPkgs.git] / pkgs / by-name / li / link-grammar / package.nix
blob25a97d0a6df510474b8fc29bf0a4920970016989
2   lib,
3   stdenv,
4   fetchurl,
5   pkg-config,
6   python3,
7   flex,
8   sqlite,
9   libedit,
10   runCommand,
11   dieHook,
14 let
16   link-grammar = stdenv.mkDerivation rec {
17     pname = "link-grammar";
18     version = "5.10.5";
20     outputs = [
21       "bin"
22       "out"
23       "dev"
24       "man"
25     ];
27     src = fetchurl {
28       url = "http://www.abisource.com/downloads/${pname}/${version}/${pname}-${version}.tar.gz";
29       sha256 = "sha256-MkcQzYEyl1/5zLU1CXMvdVhHOxwZ8XiSAAo97bhhiu0=";
30     };
32     nativeBuildInputs = [
33       pkg-config
34       python3
35       flex
36     ];
38     buildInputs = [
39       sqlite
40       libedit
41     ];
43     configureFlags = [
44       "--disable-java-bindings"
45     ];
47     doCheck = true;
49     passthru.tests = {
50       quick =
51         runCommand "link-grammar-quick-test"
52           {
53             buildInputs = [
54               link-grammar
55               dieHook
56             ];
57           }
58           ''
59             echo "Furiously sleep ideas green colorless." | link-parser en | grep "No complete linkages found." || die "Grammaticaly invalid sentence was parsed."
60             echo "Colorless green ideas sleep furiously." | link-parser en | grep "Found .* linkages." || die "Grammaticaly valid sentence was not parsed."
61             touch $out
62           '';
63     };
65     meta = with lib; {
66       description = "Grammar Checking library";
67       homepage = "https://www.abisource.com/projects/link-grammar/";
68       changelog = "https://github.com/opencog/link-grammar/blob/link-grammar-${version}/ChangeLog";
69       license = licenses.lgpl21Only;
70       maintainers = with maintainers; [ jtojnar ];
71       platforms = platforms.unix;
72     };
73   };
76 link-grammar