Merge pull request #220128 from RaitoBezarius/cairo-lang-updates

This commit is contained in:
Sandro 2023-03-24 00:13:31 +01:00 committed by GitHub
commit ab0f3d8ca2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,28 +31,16 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "cairo-lang"; pname = "cairo-lang";
version = "0.10.0"; version = "0.10.1";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchzip { src = fetchzip {
url = "https://github.com/starkware-libs/cairo-lang/releases/download/v${version}/cairo-lang-${version}.zip"; 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 = [ nativeBuildInputs = [
pythonRelaxDepsHook pythonRelaxDepsHook
]; ];
@ -99,6 +87,10 @@ buildPythonPackage rec {
"pytest-asyncio" "pytest-asyncio"
]; ];
postFixup = ''
chmod +x $out/bin/*
'';
# There seems to be no test included in the ZIP release… # There seems to be no test included in the ZIP release…
# Cloning from GitHub is harder because they use a custom CMake setup # Cloning from GitHub is harder because they use a custom CMake setup
# TODO(raitobezarius): upstream was pinged out of band about it. # TODO(raitobezarius): upstream was pinged out of band about it.