1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 rustfmt,
6 perl,
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "cairo";
11 version = "2.11.2";
12
13 src = fetchFromGitHub {
14 owner = "starkware-libs";
15 repo = "cairo";
16 rev = "v${version}";
17 hash = "sha256-VOyqKeiPJ3/VOqcdQXC/rZnTriC2ScmAQ4IlouHjvpI=";
18 };
19
20 cargoHash = "sha256-e2Nire1TLcliq5KxoINJIZJdgohHRTXqIZPj1GNIe2A=";
21
22 # openssl crate requires perl during build process
23 nativeBuildInputs = [
24 perl
25 ];
26
27 nativeCheckInputs = [
28 rustfmt
29 ];
30
31 checkFlags = [
32 # Requires a mythical rustfmt 2.0 or a nightly compiler
33 "--skip=golden_test::sourcegen_ast"
34
35 # Test broken
36 "--skip=test_lowering_consistency"
37 ];
38
39 postInstall = ''
40 # The core library is needed for compilation.
41 cp -r corelib $out/
42 '';
43
44 meta = with lib; {
45 description = "Turing-complete language for creating provable programs for general computation";
46 homepage = "https://github.com/starkware-libs/cairo";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ raitobezarius ];
49 };
50}