Merge pull request #188011 from unhammer/cg3

cg3: init at version 1.3.7

authored by Stanisław Pitucha and committed by GitHub b0f33ebf 963ee529

+72
+9
maintainers/maintainer-list.nix
··· 13506 13506 fingerprint = "EE59 5E29 BB5B F2B3 5ED2 3F1C D276 FF74 6700 7335"; 13507 13507 }]; 13508 13508 }; 13509 + unhammer = { 13510 + email = "unhammer@fsfe.org"; 13511 + github = "unhammer"; 13512 + githubId = 56868; 13513 + name = "Kevin Brubeck Unhammer"; 13514 + keys = [{ 13515 + fingerprint = "50D4 8796 0B86 3F05 4B6A 12F9 7426 06DE 766A C60C"; 13516 + }]; 13517 + }; 13509 13518 uniquepointer = { 13510 13519 email = "uniquepointer@mailbox.org"; 13511 13520 matrix = "@uniquepointer:matrix.org";
+61
pkgs/development/interpreters/cg3/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , runCommand 5 + , dieHook 6 + , cmake 7 + , icu 8 + , boost 9 + }: 10 + 11 + let cg3 = stdenv.mkDerivation rec { 12 + pname = "cg3"; 13 + version = "1.3.7"; 14 + 15 + src = fetchFromGitHub { 16 + owner = "GrammarSoft"; 17 + repo = "${pname}"; 18 + rev = "v${version}"; 19 + sha256 = "Ena3dGoZsXOIY6mbvnfI0H7QqRifoxWIBKQrK3yQSmY="; 20 + }; 21 + 22 + nativeBuildInputs = [ 23 + cmake 24 + ]; 25 + 26 + buildInputs = [ 27 + icu 28 + boost 29 + ]; 30 + 31 + doCheck = true; 32 + 33 + passthru.tests.minimal = runCommand "${pname}-test" { 34 + buildInputs = [ 35 + cg3 36 + dieHook 37 + ]; 38 + } '' 39 + echo 'DELIMITERS = "."; ADD (tag) (*);' >grammar.cg3 40 + printf '"<a>"\n\t"a" tag\n\n' >want.txt 41 + printf '"<a>"\n\t"a"\n\n' | vislcg3 -g grammar.cg3 >got.txt 42 + diff -s want.txt got.txt || die "Grammar application did not produce expected parse" 43 + touch $out 44 + ''; 45 + 46 + 47 + # TODO, consider optionals: 48 + # - Enable tcmalloc unless darwin? 49 + # - Enable python bindings? 50 + 51 + meta = with lib; { 52 + homepage = "https://github.com/GrammarSoft/cg3"; 53 + description = "Constraint Grammar interpreter, compiler and applicator vislcg3"; 54 + maintainers = with maintainers; [ unhammer ]; 55 + license = licenses.gpl3Plus; 56 + platforms = platforms.all; 57 + }; 58 + }; 59 + 60 + in 61 + cg3
+2
pkgs/top-level/all-packages.nix
··· 14814 14814 14815 14815 ceptre = callPackage ../development/interpreters/ceptre { }; 14816 14816 14817 + cg3 = callPackage ../development/interpreters/cg3 { }; 14818 + 14817 14819 cling = callPackage ../development/interpreters/cling { }; 14818 14820 14819 14821 clips = callPackage ../development/interpreters/clips { };