2022-12-07 15:12:39 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-09-21 09:11:20 +00:00
|
|
|
, fetchFromGitLab
|
2022-02-28 14:29:36 +00:00
|
|
|
, git
|
2021-09-21 09:11:20 +00:00
|
|
|
, coq
|
2022-10-11 07:24:21 +00:00
|
|
|
, ocamlPackages
|
2021-09-21 09:11:20 +00:00
|
|
|
, cacert
|
2022-10-11 06:50:54 +00:00
|
|
|
, ocaml-crunch
|
2023-04-27 14:31:24 +00:00
|
|
|
, jq
|
|
|
|
, mustache-go
|
|
|
|
, yaml2json
|
|
|
|
, tezos-rust-libs
|
2023-05-05 13:02:39 +00:00
|
|
|
, darwin
|
2021-09-21 09:11:20 +00:00
|
|
|
}:
|
|
|
|
|
2022-10-11 07:24:21 +00:00
|
|
|
ocamlPackages.buildDunePackage rec {
|
2021-09-21 09:11:20 +00:00
|
|
|
pname = "ligo";
|
2023-09-27 19:03:09 +00:00
|
|
|
version = "1.0.0";
|
2021-09-21 09:11:20 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "ligolang";
|
|
|
|
repo = "ligo";
|
2021-10-22 08:54:19 +00:00
|
|
|
rev = version;
|
2023-09-27 19:03:09 +00:00
|
|
|
sha256 = "sha256-tHIIA1JE7mzDIf2v9IEZt1pjVQEA89zjTsmqhzTn3Wc=";
|
2022-02-28 14:29:36 +00:00
|
|
|
fetchSubmodules = true;
|
2021-09-21 09:11:20 +00:00
|
|
|
};
|
|
|
|
|
2023-05-12 11:37:12 +00:00
|
|
|
postPatch = ''
|
2023-09-27 19:03:09 +00:00
|
|
|
substituteInPlace "vendors/tezos-ligo/dune-project" \
|
2023-05-12 11:37:12 +00:00
|
|
|
--replace \
|
2023-09-27 19:03:09 +00:00
|
|
|
"(using ctypes 0.1)" \
|
|
|
|
"(using ctypes 0.3)" \
|
2023-05-12 11:37:12 +00:00
|
|
|
--replace \
|
2023-09-27 19:03:09 +00:00
|
|
|
"(lang dune 3.0)" \
|
|
|
|
"(lang dune 3.7)"
|
2023-05-12 11:37:12 +00:00
|
|
|
|
2023-09-27 19:03:09 +00:00
|
|
|
substituteInPlace "src/coq/dune" \
|
2023-05-12 11:37:12 +00:00
|
|
|
--replace \
|
2023-09-27 19:03:09 +00:00
|
|
|
"(name ligo_coq)" \
|
|
|
|
"(name ligo_coq)(mode vo)"
|
2023-05-12 11:37:12 +00:00
|
|
|
'';
|
|
|
|
|
2021-09-21 09:11:20 +00:00
|
|
|
# The build picks this up for ligo --version
|
2021-10-22 08:54:19 +00:00
|
|
|
LIGO_VERSION = version;
|
2023-04-27 14:31:24 +00:00
|
|
|
|
|
|
|
# This is a hack to work around the hack used in the dune files
|
|
|
|
OPAM_SWITCH_PREFIX = "${tezos-rust-libs}";
|
2021-09-21 09:11:20 +00:00
|
|
|
|
2022-02-28 14:29:36 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-10-11 06:50:54 +00:00
|
|
|
ocaml-crunch
|
2022-02-28 14:29:36 +00:00
|
|
|
git
|
|
|
|
coq
|
2022-10-11 07:24:21 +00:00
|
|
|
ocamlPackages.crunch
|
|
|
|
ocamlPackages.menhir
|
|
|
|
ocamlPackages.ocaml-recovery-parser
|
2023-04-27 14:31:24 +00:00
|
|
|
# deps for changelog
|
|
|
|
jq
|
|
|
|
mustache-go
|
|
|
|
yaml2json
|
2022-02-28 14:29:36 +00:00
|
|
|
];
|
|
|
|
|
2022-10-11 07:24:21 +00:00
|
|
|
buildInputs = with ocamlPackages; [
|
2021-09-21 09:11:20 +00:00
|
|
|
coq
|
|
|
|
menhir
|
|
|
|
menhirLib
|
|
|
|
qcheck
|
|
|
|
ocamlgraph
|
2022-02-28 14:29:36 +00:00
|
|
|
bisect_ppx
|
2022-10-11 07:24:21 +00:00
|
|
|
decompress
|
2021-09-21 09:11:20 +00:00
|
|
|
ppx_deriving
|
|
|
|
ppx_deriving_yojson
|
2023-08-16 15:06:29 +00:00
|
|
|
ppx_yojson_conv
|
2021-09-21 09:11:20 +00:00
|
|
|
ppx_expect
|
2022-02-28 14:29:36 +00:00
|
|
|
ppx_import
|
|
|
|
terminal_size
|
|
|
|
ocaml-recovery-parser
|
2021-09-21 09:11:20 +00:00
|
|
|
yojson
|
|
|
|
getopt
|
2022-02-28 14:29:36 +00:00
|
|
|
core
|
2022-05-23 05:18:37 +00:00
|
|
|
core_unix
|
2021-09-21 09:11:20 +00:00
|
|
|
pprint
|
|
|
|
linenoise
|
2022-10-11 06:50:54 +00:00
|
|
|
crunch
|
2022-10-11 07:24:21 +00:00
|
|
|
semver
|
|
|
|
lambda-term
|
|
|
|
tar-unix
|
|
|
|
parse-argv
|
2023-04-27 14:31:24 +00:00
|
|
|
hacl-star
|
|
|
|
prometheus
|
2023-09-27 19:03:09 +00:00
|
|
|
lwt_ppx
|
|
|
|
msgpck
|
2023-04-27 14:31:24 +00:00
|
|
|
# lsp
|
|
|
|
linol
|
|
|
|
linol-lwt
|
|
|
|
ocaml-lsp
|
2022-02-28 14:29:36 +00:00
|
|
|
# Test helpers deps
|
|
|
|
qcheck
|
|
|
|
qcheck-alcotest
|
|
|
|
alcotest-lwt
|
|
|
|
# vendored tezos' deps
|
2023-04-27 14:31:24 +00:00
|
|
|
aches
|
|
|
|
aches-lwt
|
2022-02-28 14:29:36 +00:00
|
|
|
ctypes
|
2022-10-11 07:24:21 +00:00
|
|
|
ctypes_stubs_js
|
|
|
|
class_group_vdf
|
|
|
|
dune-configurator
|
2022-02-28 14:29:36 +00:00
|
|
|
hacl-star
|
|
|
|
hacl-star-raw
|
|
|
|
lwt-canceler
|
|
|
|
ipaddr
|
2022-10-11 06:50:54 +00:00
|
|
|
bls12-381
|
2022-10-27 10:09:29 +00:00
|
|
|
bls12-381-signature
|
2022-02-28 14:29:36 +00:00
|
|
|
ptime
|
2023-05-06 06:56:22 +00:00
|
|
|
mtime_1
|
2022-02-28 14:29:36 +00:00
|
|
|
lwt_log
|
|
|
|
secp256k1-internal
|
|
|
|
resto
|
|
|
|
resto-directory
|
|
|
|
resto-cohttp-self-serving-client
|
|
|
|
irmin-pack
|
|
|
|
ezjsonm
|
2021-09-21 09:11:20 +00:00
|
|
|
data-encoding
|
2022-10-11 07:24:21 +00:00
|
|
|
pure-splitmix
|
|
|
|
zarith_stubs_js
|
2023-02-20 08:57:14 +00:00
|
|
|
simple-diff
|
2023-06-08 14:00:16 +00:00
|
|
|
seqes
|
|
|
|
stdint
|
2023-05-05 13:02:39 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
2021-09-21 09:11:20 +00:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-21 09:11:20 +00:00
|
|
|
cacert
|
2022-10-11 07:24:21 +00:00
|
|
|
ocamlPackages.ca-certs
|
2021-09-21 09:11:20 +00:00
|
|
|
];
|
|
|
|
|
2022-01-23 20:24:16 +00:00
|
|
|
doCheck = false; # Tests fail, but could not determine the reason
|
2021-09-21 09:11:20 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://ligolang.org/";
|
|
|
|
downloadPage = "https://ligolang.org/docs/intro/installation";
|
|
|
|
description = "A friendly Smart Contract Language for Tezos";
|
|
|
|
license = licenses.mit;
|
2022-10-11 07:24:21 +00:00
|
|
|
platforms = ocamlPackages.ocaml.meta.platforms;
|
2022-12-07 15:12:39 +00:00
|
|
|
broken = stdenv.isLinux && stdenv.isAarch64;
|
2021-09-21 09:11:20 +00:00
|
|
|
maintainers = with maintainers; [ ulrikstrid ];
|
|
|
|
};
|
|
|
|
}
|