Skip to content

Commit

Permalink
python3Packages.cairo-lang: 0.10.0 -> 0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
RaitoBezarius committed Mar 22, 2023
1 parent 901f07f commit 25de652
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions pkgs/development/python-modules/cairo-lang/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,16 @@

buildPythonPackage rec {
pname = "cairo-lang";
version = "0.10.0";
version = "0.10.1";
format = "setuptools";

disabled = pythonOlder "3.7";

src = fetchzip {
url = "https://github.com/starkware-libs/cairo-lang/releases/download/v${version}/cairo-lang-${version}.zip";
hash = "sha256-+PE7RSKEGADbue63FoT6UBOwURJs7lBNkL7aNlpSxP8=";
hash = "sha256-MNbzDqqNhij9JizozLp9hhQjbRGzWxECOErS3TOPlAA=";
};

# TODO: remove a substantial part when https://github.com/starkware-libs/cairo-lang/pull/88/files is merged.
postPatch = ''
substituteInPlace requirements.txt \
--replace "lark-parser" "lark"
substituteInPlace starkware/cairo/lang/compiler/parser_transformer.py \
--replace 'value, meta' 'meta, value' \
--replace 'value: Tuple[CommaSeparatedWithNotes], meta' 'meta, value: Tuple[CommaSeparatedWithNotes]'
substituteInPlace starkware/cairo/lang/compiler/parser.py \
--replace 'standard' 'basic'
'';

nativeBuildInputs = [
pythonRelaxDepsHook
];
Expand Down Expand Up @@ -99,6 +87,10 @@ buildPythonPackage rec {
"pytest-asyncio"
];

postFixup = ''
chmod +x $out/bin/*
'';

# There seems to be no test included in the ZIP release…
# Cloning from GitHub is harder because they use a custom CMake setup
# TODO(raitobezarius): upstream was pinged out of band about it.
Expand Down

0 comments on commit 25de652

Please sign in to comment.