1{
2 lib,
3 fetchFromGitLab,
4 git,
5 coq,
6 ocamlPackages,
7 cacert,
8 ocaml-crunch,
9 jq,
10 mustache-go,
11 yaml2json,
12 tezos-rust-libs,
13}:
14
15ocamlPackages.buildDunePackage rec {
16 pname = "ligo";
17 version = "1.7.1";
18 src = fetchFromGitLab {
19 owner = "ligolang";
20 repo = "ligo";
21 rev = version;
22 hash = "sha256-pBoLgS/9MLMrc98niI+o2JoJ3gpvhyRY2o9GmVc5hIA=";
23 fetchSubmodules = true;
24 };
25
26 patches = [ ./make-compatible-with-linol-0_6.patch ];
27
28 # The build picks this up for ligo --version
29 LIGO_VERSION = version;
30
31 # This is a hack to work around the hack used in the dune files
32 OPAM_SWITCH_PREFIX = "${tezos-rust-libs}";
33
34 nativeBuildInputs = [
35 ocaml-crunch
36 git
37 coq
38 ocamlPackages.crunch
39 ocamlPackages.menhir
40 ocamlPackages.ocaml-recovery-parser
41 # deps for changelog
42 jq
43 mustache-go
44 yaml2json
45 ];
46
47 buildInputs = with ocamlPackages; [
48 coq
49 menhir
50 menhirLib
51 qcheck
52 ocamlgraph
53 bisect_ppx
54 decompress
55 fileutils
56 ppx_deriving
57 ppx_deriving_yojson
58 ppx_yojson_conv
59 ppx_expect
60 ppx_import
61 terminal_size
62 ocaml-recovery-parser
63 yojson
64 getopt
65 core
66 core_unix
67 pprint
68 linenoise
69 crunch
70 semver
71 lambda-term
72 tar-unix
73 parse-argv
74 hacl-star
75 prometheus
76 lwt_ppx
77 msgpck
78 # lsp
79 linol
80 linol-lwt
81 ocaml-lsp
82 # Test helpers deps
83 qcheck
84 qcheck-alcotest
85 alcotest-lwt
86 # vendored tezos' deps
87 aches
88 aches-lwt
89 ctypes
90 ctypes_stubs_js
91 class_group_vdf
92 dune-configurator
93 hacl-star
94 hacl-star-raw
95 lwt-canceler
96 ipaddr
97 bls12-381
98 bls12-381-signature
99 ptime
100 mtime
101 lwt_log
102 secp256k1-internal
103 resto
104 resto-directory
105 resto-cohttp-self-serving-client
106 irmin-pack
107 ezjsonm
108 data-encoding
109 pure-splitmix
110 zarith_stubs_js
111 simple-diff
112 seqes
113 stdint
114 tezt
115 ];
116
117 nativeCheckInputs = [
118 cacert
119 ocamlPackages.ca-certs
120 ];
121
122 doCheck = false; # Tests fail, but could not determine the reason
123
124 meta = with lib; {
125 homepage = "https://ligolang.org/";
126 downloadPage = "https://ligolang.org/docs/intro/installation";
127 description = "Friendly Smart Contract Language for Tezos";
128 mainProgram = "ligo";
129 license = licenses.mit;
130 platforms = ocamlPackages.ocaml.meta.platforms;
131 maintainers = with maintainers; [ ulrikstrid ];
132 };
133}