summary refs log tree commit diff
path: root/pkgs/development/python-modules/antlr4-python2-runtime
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2019-08-14 14:26:49 -0700
committerJonathan Ringer <jonringer117@gmail.com>2019-09-29 03:14:22 -0700
commit24fde6615657f8de75d1ea5f73cde3694eac33f2 (patch)
tree0286d467e0b998b11183aaa446429ac437193112 /pkgs/development/python-modules/antlr4-python2-runtime
parentcca1670bcda2ff78e05c6260b1ef594252077588 (diff)
downloadnixpkgs-24fde6615657f8de75d1ea5f73cde3694eac33f2.tar
nixpkgs-24fde6615657f8de75d1ea5f73cde3694eac33f2.tar.gz
nixpkgs-24fde6615657f8de75d1ea5f73cde3694eac33f2.tar.bz2
nixpkgs-24fde6615657f8de75d1ea5f73cde3694eac33f2.tar.lz
nixpkgs-24fde6615657f8de75d1ea5f73cde3694eac33f2.tar.xz
nixpkgs-24fde6615657f8de75d1ea5f73cde3694eac33f2.tar.zst
nixpkgs-24fde6615657f8de75d1ea5f73cde3694eac33f2.zip
pythonPackages.antlr4-python{2,3}-runtime: use antlr4 source
Diffstat (limited to 'pkgs/development/python-modules/antlr4-python2-runtime')
-rw-r--r--pkgs/development/python-modules/antlr4-python2-runtime/default.nix19
1 files changed, 11 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/antlr4-python2-runtime/default.nix b/pkgs/development/python-modules/antlr4-python2-runtime/default.nix
index b343be1d7bb..aa18a0fe290 100644
--- a/pkgs/development/python-modules/antlr4-python2-runtime/default.nix
+++ b/pkgs/development/python-modules/antlr4-python2-runtime/default.nix
@@ -1,18 +1,21 @@
-{ stdenv, fetchPypi, buildPythonPackage, isPy3k }:
+{ lib, buildPythonPackage, isPy3k, python
+, antlr4
+}:
 
 buildPythonPackage rec {
   pname = "antlr4-python2-runtime";
-  version = "4.7.2";
+  inherit (antlr4.runtime.cpp) version src;
   disabled = isPy3k;
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "04ljic5wnqpizln8q3c78pqrckz6q5nb433if00j1mlyv2yja22q";
-  };
+  sourceRoot = "source/runtime/Python2";
+
+  checkPhase = ''
+    ${python.interpreter} tests/TestTokenStreamRewriter.py
+  '';
 
-  meta = {
+  meta = with lib; {
     description = "Runtime for ANTLR";
     homepage = "https://www.antlr.org/";
-    license = stdenv.lib.licenses.bsd3;
+    license = licenses.bsd3;
   };
 }