mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
86ec321e63
https://github.com/opencog/link-grammar/blob/link-grammar-5.9.1/ChangeLog Remove libz dependency since that has only been used by minisat. Also clean up the expression.
66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, pkg-config
|
|
, python3
|
|
, sqlite
|
|
, libedit
|
|
, runCommand
|
|
, dieHook
|
|
}:
|
|
|
|
let
|
|
|
|
link-grammar = stdenv.mkDerivation rec {
|
|
pname = "link-grammar";
|
|
version = "5.9.1";
|
|
|
|
outputs = [ "bin" "out" "dev" "man" ];
|
|
|
|
src = fetchurl {
|
|
url = "http://www.abisource.com/downloads/${pname}/${version}/${pname}-${version}.tar.gz";
|
|
sha256 = "sha256-4D/rqoIGlvR+q7Az8E1xPYSQQMJMRVeRM9HQIbjssLo=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
python3
|
|
];
|
|
|
|
buildInputs = [
|
|
sqlite
|
|
libedit
|
|
];
|
|
|
|
configureFlags = [
|
|
"--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/";
|
|
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
|