about summary refs log tree commit diff
path: root/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-10-08 11:56:52 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-10-08 11:56:52 +0200
commita0c34f54cc61dc20ae1ec91766b9efad102f5b36 (patch)
tree96aeb2b4fb3aeff9ecc8c52d173c3b8d57a0ce59 /pkgs/development/python-modules/antlr4-python3-runtime/default.nix
parent0913e30c859f0071d0f0529c309d4256713acc41 (diff)
parent60b2fe660e2bcb605650173b7b0a59a47bc6a7e5 (diff)
downloadnixlib-a0c34f54cc61dc20ae1ec91766b9efad102f5b36.tar
nixlib-a0c34f54cc61dc20ae1ec91766b9efad102f5b36.tar.gz
nixlib-a0c34f54cc61dc20ae1ec91766b9efad102f5b36.tar.bz2
nixlib-a0c34f54cc61dc20ae1ec91766b9efad102f5b36.tar.lz
nixlib-a0c34f54cc61dc20ae1ec91766b9efad102f5b36.tar.xz
nixlib-a0c34f54cc61dc20ae1ec91766b9efad102f5b36.tar.zst
nixlib-a0c34f54cc61dc20ae1ec91766b9efad102f5b36.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development/python-modules/antlr4-python3-runtime/default.nix')
-rw-r--r--pkgs/development/python-modules/antlr4-python3-runtime/default.nix20
1 files changed, 12 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/antlr4-python3-runtime/default.nix b/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
index 3ebba9f9d385..0fade1362c9c 100644
--- a/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
+++ b/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
@@ -1,18 +1,22 @@
-{ stdenv, fetchPypi, buildPythonPackage, isPy3k }:
+{ lib, buildPythonPackage, isPy3k, python
+, antlr4
+}:
 
 buildPythonPackage rec {
   pname = "antlr4-python3-runtime";
-  version = "4.7.2";
+  inherit (antlr4.runtime.cpp) version src;
   disabled = !isPy3k;
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "02xm7ccsf51vh4xsnhlg6pvchm1x3ckgv9kwm222w5drizndr30n";
-  };
+  sourceRoot = "source/runtime/Python3";
+
+  checkPhase = ''
+    cd test
+    ${python.interpreter} ctest.py
+  '';
 
-  meta = {
+  meta = with lib; {
     description = "Runtime for ANTLR";
     homepage = "https://www.antlr.org/";
-    license = stdenv.lib.licenses.bsd3;
+    license = licenses.bsd3;
   };
 }