2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustfmt
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cairo";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "2.5.4";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "starkware-libs";
|
|
|
|
repo = "cairo";
|
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-ctb5VingMczzHLyyEjKgFKNAZI3/fqzjFW/RQGDSsyQ=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-T21GuGQaX/VD907MEGp68bQPXrRK0it4o1nLEdHwTsE=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
rustfmt
|
|
|
|
];
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# Requires a mythical rustfmt 2.0 or a nightly compiler
|
|
|
|
"--skip=golden_test::sourcegen_ast"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# The core library is needed for compilation.
|
|
|
|
cp -r corelib $out/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Turing-complete language for creating provable programs for general computation";
|
|
|
|
homepage = "https://github.com/starkware-libs/cairo";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ raitobezarius ];
|
|
|
|
};
|
|
|
|
}
|