Merge pull request #66643 from jonringer/bump-antlr4

antlr4: 4.7.1 -> 4.7.2
This commit is contained in:
Mario Rodas 2019-10-05 19:18:17 -05:00 committed by GitHub
commit 03a5cf8444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 21 deletions

View File

@ -37,6 +37,12 @@ in stdenv.mkDerivation rec {
}) })
]; ];
# have it look for 4.7.2 instead of 4.7.1
preConfigure = ''
substituteInPlace CMakeLists.txt \
--replace "antlr-4.7.1-complete.jar" "antlr-4.7.2-complete.jar"
'';
nativeBuildInputs = [ nativeBuildInputs = [
cmake ninja pkgconfig jre swig wrapGAppsHook cmake ninja pkgconfig jre swig wrapGAppsHook
]; ];

View File

@ -1,18 +1,21 @@
{ stdenv, fetchPypi, buildPythonPackage, isPy3k }: { lib, buildPythonPackage, isPy3k, python
, antlr4
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "antlr4-python2-runtime"; pname = "antlr4-python2-runtime";
version = "4.7.2"; inherit (antlr4.runtime.cpp) version src;
disabled = isPy3k; disabled = isPy3k;
src = fetchPypi { sourceRoot = "source/runtime/Python2";
inherit pname version;
sha256 = "04ljic5wnqpizln8q3c78pqrckz6q5nb433if00j1mlyv2yja22q";
};
meta = { checkPhase = ''
${python.interpreter} tests/TestTokenStreamRewriter.py
'';
meta = with lib; {
description = "Runtime for ANTLR"; description = "Runtime for ANTLR";
homepage = "https://www.antlr.org/"; homepage = "https://www.antlr.org/";
license = stdenv.lib.licenses.bsd3; license = licenses.bsd3;
}; };
} }

View File

@ -1,18 +1,22 @@
{ stdenv, fetchPypi, buildPythonPackage, isPy3k }: { lib, buildPythonPackage, isPy3k, python
, antlr4
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "antlr4-python3-runtime"; pname = "antlr4-python3-runtime";
version = "4.7.2"; inherit (antlr4.runtime.cpp) version src;
disabled = !isPy3k; disabled = !isPy3k;
src = fetchPypi { sourceRoot = "source/runtime/Python3";
inherit pname version;
sha256 = "02xm7ccsf51vh4xsnhlg6pvchm1x3ckgv9kwm222w5drizndr30n";
};
meta = { checkPhase = ''
cd test
${python.interpreter} ctest.py
'';
meta = with lib; {
description = "Runtime for ANTLR"; description = "Runtime for ANTLR";
homepage = "https://www.antlr.org/"; homepage = "https://www.antlr.org/";
license = stdenv.lib.licenses.bsd3; license = licenses.bsd3;
}; };
} }

View File

@ -2,12 +2,12 @@
, fetchFromGitHub, cmake, ninja, pkgconfig, libuuid, darwin }: , fetchFromGitHub, cmake, ninja, pkgconfig, libuuid, darwin }:
let let
version = "4.7.1"; version = "4.7.2";
source = fetchFromGitHub { source = fetchFromGitHub {
owner = "antlr"; owner = "antlr";
repo = "antlr4"; repo = "antlr4";
rev = version; rev = version;
sha256 = "1xb4d9bd4hw406v85s64gg8gwcrrsrw171vhga1gz4xj6pzfwxz7"; sha256 = "1pl0zs6c6wx9nmq30s7ccpc3dl72az55i8vfp574fw9sywmvxmlj";
}; };
runtime = { runtime = {
@ -38,9 +38,10 @@ let
antlr = stdenv.mkDerivation { antlr = stdenv.mkDerivation {
pname = "antlr"; pname = "antlr";
inherit version; inherit version;
src = fetchurl { src = fetchurl {
url ="https://www.antlr.org/download/antlr-${version}-complete.jar"; url ="https://www.antlr.org/download/antlr-${version}-complete.jar";
sha256 = "1236gwnzchama92apb2swmklnypj01m7bdwwfvwvl8ym85scw7gl"; sha256 = "1d40nfkq3ws8g4ksx4gj6l6m2l9j4b605q6sf68z5vvmg5nkhlk8";
}; };
dontUnpack = true; dontUnpack = true;

View File

@ -1387,9 +1387,9 @@ in {
amqplib = callPackage ../development/python-modules/amqplib {}; amqplib = callPackage ../development/python-modules/amqplib {};
antlr4-python2-runtime = callPackage ../development/python-modules/antlr4-python2-runtime {}; antlr4-python2-runtime = callPackage ../development/python-modules/antlr4-python2-runtime { antlr4 = pkgs.antlr4; };
antlr4-python3-runtime = callPackage ../development/python-modules/antlr4-python3-runtime {}; antlr4-python3-runtime = callPackage ../development/python-modules/antlr4-python3-runtime { antlr4 = pkgs.antlr4; };
apipkg = callPackage ../development/python-modules/apipkg {}; apipkg = callPackage ../development/python-modules/apipkg {};