571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
68 lines
1.4 KiB
Nix
68 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, pkg-config
|
|
, python3
|
|
, flex
|
|
, sqlite
|
|
, libedit
|
|
, runCommand
|
|
, dieHook
|
|
}:
|
|
|
|
let
|
|
|
|
link-grammar = stdenv.mkDerivation rec {
|
|
pname = "link-grammar";
|
|
version = "5.10.5";
|
|
|
|
outputs = [ "bin" "out" "dev" "man" ];
|
|
|
|
src = fetchurl {
|
|
url = "http://www.abisource.com/downloads/${pname}/${version}/${pname}-${version}.tar.gz";
|
|
sha256 = "sha256-MkcQzYEyl1/5zLU1CXMvdVhHOxwZ8XiSAAo97bhhiu0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
python3
|
|
flex
|
|
];
|
|
|
|
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 = "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
|