antlr4_7.runtime.cpp: init at 4.7.1

This commit is contained in:
Jan Tojnar 2018-08-08 23:47:31 +02:00
parent aebb64f59f
commit f07203656b
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -1,8 +1,40 @@
{stdenv, fetchurl, jre}:
{ stdenv, fetchurl, jre
, fetchFromGitHub, cmake, ninja, pkgconfig, libuuid, darwin }:
stdenv.mkDerivation rec {
name = "antlr-${version}";
let
version = "4.7.1";
source = fetchFromGitHub {
owner = "antlr";
repo = "antlr4";
rev = version;
sha256 = "1xb4d9bd4hw406v85s64gg8gwcrrsrw171vhga1gz4xj6pzfwxz7";
};
runtime = {
cpp = stdenv.mkDerivation {
name = "antlr-runtime-cpp-${version}";
src = source;
outputs = [ "out" "dev" "doc" ];
nativeBuildInputs = [ cmake ninja pkgconfig ];
buildInputs = stdenv.lib.optional stdenv.isLinux libuuid
++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreFoundation;
postUnpack = ''
export sourceRoot=$sourceRoot/runtime/Cpp
'';
meta = with stdenv.lib; {
description = "C++ target for ANTLR 4";
homepage = http://www.antlr.org/;
platforms = platforms.unix;
};
};
};
antlr = stdenv.mkDerivation {
name = "antlr-${version}";
src = fetchurl {
url ="https://www.antlr.org/download/antlr-${version}-complete.jar";
sha256 = "1236gwnzchama92apb2swmklnypj01m7bdwwfvwvl8ym85scw7gl";
@ -26,6 +58,11 @@ stdenv.mkDerivation rec {
inherit jre;
passthru = {
inherit runtime;
jarLocation = "${antlr}/share/java/antlr-${version}-complete.jar";
};
meta = with stdenv.lib; {
description = "Powerful parser generator";
longDescription = ''
@ -38,4 +75,5 @@ stdenv.mkDerivation rec {
homepage = http://www.antlr.org/;
platforms = platforms.unix;
};
}
};
in antlr