Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9f821d9d1b77
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3df16a48bf41
Choose a head ref
  • 3 commits
  • 1 file changed
  • 3 contributors

Commits on Jan 19, 2021

  1. link-grammar: 5.8.0 -> 5.8.1

    r-ryantm committed Jan 19, 2021
    Copy the full SHA
    dc912f4 View commit details

Commits on Jan 20, 2021

  1. link-grammar: Improve

    - Add meta.changelog
    - Correct license
    - Run tests
    - Add quick smoke test to passthru.tests
    jtojnar committed Jan 20, 2021
    Copy the full SHA
    db28fc9 View commit details
  2. Merge pull request #110043 from r-ryantm/auto-update/link-grammar

    link-grammar: 5.8.0 -> 5.8.1
    ryantm authored Jan 20, 2021
    Copy the full SHA
    3df16a4 View commit details
Showing with 27 additions and 6 deletions.
  1. +27 −6 pkgs/tools/text/link-grammar/default.nix
33 changes: 27 additions & 6 deletions pkgs/tools/text/link-grammar/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{ lib, stdenv, fetchurl, pkg-config, python3, sqlite, libedit, zlib }:
{ lib, stdenv, fetchurl, pkg-config, python3, sqlite, libedit, zlib, runCommand, dieHook }:

stdenv.mkDerivation rec {
version = "5.8.0";
let

link-grammar = stdenv.mkDerivation rec {
version = "5.8.1";
pname = "link-grammar";

outputs = [ "bin" "out" "dev" "man" ];

src = fetchurl {
url = "http://www.abisource.com/downloads/${pname}/${version}/${pname}-${version}.tar.gz";
sha256 = "1v8ngx77nachxln68xpvyw2lh7z59pzsi99h8j0mnrm0gjsacrdd";
sha256 = "sha256-EcT/VR+lFpJX2sxXUIDGOwdceQ7awpmEqUZBoJk7UFs=";
};

nativeBuildInputs = [ pkg-config python3 ];
@@ -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