link-grammar: Improve
- Add meta.changelog - Correct license - Run tests - Add quick smoke test to passthru.tests
This commit is contained in:
parent
dc912f45d7
commit
db28fc965b
@ -1,6 +1,8 @@
|
||||
{ lib, stdenv, fetchurl, pkg-config, python3, sqlite, libedit, zlib }:
|
||||
{ lib, stdenv, fetchurl, pkg-config, python3, sqlite, libedit, zlib, runCommand, dieHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
let
|
||||
|
||||
link-grammar = stdenv.mkDerivation rec {
|
||||
version = "5.8.1";
|
||||
pname = "link-grammar";
|
||||
|
||||
@ -18,11 +20,30 @@ stdenv.mkDerivation rec {
|
||||
"--disable-java-bindings"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru.tests = {
|
||||
quick = runCommand "link-grammar-quick-test" {
|
||||
buildInputs = [
|
||||
link-grammar
|
||||
dieHook
|
||||
];
|
||||
} ''
|
||||
echo "Furiously sleep ideas green colorless." | link-parser en | grep "No complete linkages found." || die "Grammaticaly invalid sentence was parsed."
|
||||
echo "Colorless green ideas sleep furiously." | link-parser en | grep "Found .* linkages." || die "Grammaticaly valid sentence was not parsed."
|
||||
touch $out
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Grammar Checking library";
|
||||
homepage = "https://www.abisource.com/projects/link-grammar/";
|
||||
license = licenses.lgpl21;
|
||||
changelog = "https://github.com/opencog/link-grammar/blob/link-grammar-${version}/ChangeLog";
|
||||
license = licenses.lgpl21Only;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
in
|
||||
link-grammar
|
||||
|
Loading…
Reference in New Issue
Block a user