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