From 67bd77f0ea318f506c7384daff1d25f39c619fb2 Mon Sep 17 00:00:00 2001 From: Laurent CaniBot Date: Wed, 27 Sep 2023 19:03:09 +0000 Subject: [PATCH] ligo: 0.72.0 -> 1.0.0 --- pkgs/development/compilers/ligo/default.nix | 27 +++++++++------------ pkgs/top-level/all-packages.nix | 10 +++++--- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/pkgs/development/compilers/ligo/default.nix b/pkgs/development/compilers/ligo/default.nix index 8257eab56aa2..ccba9ca3a1b2 100644 --- a/pkgs/development/compilers/ligo/default.nix +++ b/pkgs/development/compilers/ligo/default.nix @@ -15,31 +15,28 @@ ocamlPackages.buildDunePackage rec { pname = "ligo"; - version = "0.72.0"; + version = "1.0.0"; src = fetchFromGitLab { owner = "ligolang"; repo = "ligo"; rev = version; - sha256 = "sha256-DQ3TxxLxi8/W1+uBX7NEBIsVXBKnJBa6YNRBFleNrEA="; + sha256 = "sha256-tHIIA1JE7mzDIf2v9IEZt1pjVQEA89zjTsmqhzTn3Wc="; fetchSubmodules = true; }; postPatch = '' - substituteInPlace "vendors/tezos-ligo/src/lib_hacl/hacl.ml" \ + substituteInPlace "vendors/tezos-ligo/dune-project" \ --replace \ - "Hacl.NaCl.Noalloc.Easy.secretbox ~pt:msg ~n:nonce ~key ~ct:cmsg" \ - "Hacl.NaCl.Noalloc.Easy.secretbox ~pt:msg ~n:nonce ~key ~ct:cmsg ()" \ + "(using ctypes 0.1)" \ + "(using ctypes 0.3)" \ --replace \ - "Hacl.NaCl.Noalloc.Easy.box_afternm ~pt:msg ~n:nonce ~ck:k ~ct:cmsg" \ - "Hacl.NaCl.Noalloc.Easy.box_afternm ~pt:msg ~n:nonce ~ck:k ~ct:cmsg ()" + "(lang dune 3.0)" \ + "(lang dune 3.7)" - substituteInPlace "vendors/tezos-ligo/src/lib_crypto/crypto_box.ml" \ + substituteInPlace "src/coq/dune" \ --replace \ - "secretbox_open ~key ~nonce ~cmsg ~msg" \ - "secretbox_open ~key ~nonce ~cmsg ~msg ()" \ - --replace \ - "Box.box_open ~k ~nonce ~cmsg ~msg" \ - "Box.box_open ~k ~nonce ~cmsg ~msg ()" + "(name ligo_coq)" \ + "(name ligo_coq)(mode vo)" ''; # The build picks this up for ligo --version @@ -48,8 +45,6 @@ ocamlPackages.buildDunePackage rec { # This is a hack to work around the hack used in the dune files OPAM_SWITCH_PREFIX = "${tezos-rust-libs}"; - duneVersion = "3"; - strictDeps = true; nativeBuildInputs = [ @@ -93,6 +88,8 @@ ocamlPackages.buildDunePackage rec { parse-argv hacl-star prometheus + lwt_ppx + msgpck # lsp linol linol-lwt diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d4016ea74328..67310181853f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9880,9 +9880,13 @@ with pkgs; ldc = callPackage ../development/compilers/ldc { }; - ligo = callPackage ../development/compilers/ligo { - coq = coq_8_14; - ocamlPackages = ocaml-ng.ocamlPackages_4_14_janeStreet_0_15; + ligo = + let ocaml_p = ocaml-ng.ocamlPackages_4_14_janeStreet_0_15; in + callPackage ../development/compilers/ligo { + coq = coq_8_13.override { + customOCamlPackages = ocaml_p; + }; + ocamlPackages = ocaml_p; }; lego = callPackage ../tools/admin/lego { };