git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #110043 from r-ryantm/auto-update/link-grammar

link-grammar: 5.8.0 -> 5.8.1

commit3df16a48bf41b440c0809ef11e420ece12282549 authorRyan Mulligan <ryan@ryantm.com> dateWed 20 Jan 2021, 07:31 (6 years ago) parent9f821d9db28fc9
1 file changed+27−6
pkgs/tools/text/link-grammar/default.nix+27−6
pkgs/tools/text/link-grammar/default.nix+27−6
@@ -1,14 +1,16 @@
1−{ lib, stdenv, fetchurl, pkg-config, python3, sqlite, libedit, zlib }:
1+{ lib, stdenv, fetchurl, pkg-config, python3, sqlite, libedit, zlib, runCommand, dieHook }:
22
3−stdenv.mkDerivation rec {
4− version = "5.8.0";
3+let
4+
5+link-grammar = stdenv.mkDerivation rec {
6+ version = "5.8.1";
57 pname = "link-grammar";
68
79 outputs = [ "bin" "out" "dev" "man" ];
810
911 src = fetchurl {
1012 url = "http://www.abisource.com/downloads/${pname}/${version}/${pname}-${version}.tar.gz";
11− sha256 = "1v8ngx77nachxln68xpvyw2lh7z59pzsi99h8j0mnrm0gjsacrdd";
13+ sha256 = "sha256-EcT/VR+lFpJX2sxXUIDGOwdceQ7awpmEqUZBoJk7UFs=";
1214 };
1315
1416 nativeBuildInputs = [ pkg-config python3 ];
@@ -18,11 +20,30 @@ stdenv.mkDerivation rec {
1820 "--disable-java-bindings"
1921 ];
2022
23+ doCheck = true;
24+
25+ passthru.tests = {
26+ quick = runCommand "link-grammar-quick-test" {
27+ buildInputs = [
28+ link-grammar
29+ dieHook
30+ ];
31+ } ''
32+ echo "Furiously sleep ideas green colorless." | link-parser en | grep "No complete linkages found." || die "Grammaticaly invalid sentence was parsed."
33+ echo "Colorless green ideas sleep furiously." | link-parser en | grep "Found .* linkages." || die "Grammaticaly valid sentence was not parsed."
34+ touch $out
35+ '';
36+ };
37+
2138 meta = with lib; {
2239 description = "A Grammar Checking library";
2340 homepage = "https://www.abisource.com/projects/link-grammar/";
24− license = licenses.lgpl21;
41+ changelog = "https://github.com/opencog/link-grammar/blob/link-grammar-${version}/ChangeLog";
42+ license = licenses.lgpl21Only;
2543 maintainers = with maintainers; [ jtojnar ];
2644 platforms = platforms.unix;
2745 };
28−}
46+};
47+
48+in
49+ link-grammar