Skip to content

Commit

Permalink
Fix Nix Runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Oct 31, 2023
1 parent d56d14f commit e932ca7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get install -y antlr4
curl -LO https://github.com/antlr/website-antlr4/raw/gh-pages/download/antlr-4.11.1-complete.jar
curl -LO https://github.com/antlr/website-antlr4/raw/gh-pages/download/antlr-4.10.1-complete.jar
- name: Build Distribution
run: make ANTLR4="java -jar antlr-4.11.1-complete.jar"
run: make ANTLR4="java -jar antlr-4.10.1-complete.jar"
- name: Set default for env.NEW_TAG
run: echo "NEW_TAG=NO_NEW_TAG" >> $GITHUB_ENV
- name: Check for new version
Expand Down
21 changes: 18 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,22 @@
gitignore-src ? import ./nix/gitignore.nix { inherit pkgs; },
}:

with pkgs; with python3.pkgs; buildPythonPackage rec {
with pkgs; with python3.pkgs; let
antlr4_10-python3-runtime = buildPythonPackage rec {
pname = "antlr4-python3-runtime";
inherit (antlr4_10.runtime.cpp) version src;

sourceRoot = "source/runtime/Python3";

doCheck = false;

meta = with lib; {
description = "Runtime for ANTLR";
homepage = "https://www.antlr.org/";
license = licenses.bsd3;
};
};
in buildPythonPackage rec {
name = "ioplace_parser";

version_file = builtins.readFile ./ioplace_parser/__version__.py;
Expand All @@ -16,7 +31,7 @@ with pkgs; with python3.pkgs; buildPythonPackage rec {
PIP_DISABLE_PIP_VERSION_CHECK = "1";

nativeBuildInputs = [
antlr4_11
antlr4_10
black
];

Expand All @@ -25,6 +40,6 @@ with pkgs; with python3.pkgs; buildPythonPackage rec {
'';

propagatedBuildInputs = [
antlr4-python3-runtime
antlr4_10-python3-runtime
];
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
antlr4-python3-runtime~=4.11.0
antlr4-python3-runtime~=4.10.0

0 comments on commit e932ca7

Please sign in to comment.