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/development/ocaml-modules/msgpck/default.nix b/pkgs/development/ocaml-modules/msgpck/default.nix new file mode 100644 index 000000000000..2871e774f3fe --- /dev/null +++ b/pkgs/development/ocaml-modules/msgpck/default.nix @@ -0,0 +1,31 @@ +{ lib +, fetchFromGitHub +, buildDunePackage +, ocplib-endian +, alcotest +}: + +buildDunePackage rec { + pname = "msgpck"; + version = "1.7"; + + src = fetchFromGitHub { + owner = "vbmithr"; + repo = "ocaml-msgpck"; + rev = "${version}"; + hash = "sha256-gBHIiicmk/5KBkKzRKyV0ymEH8dGCZG8vfE0mtpcDCM="; + }; + + propagatedBuildInputs = [ ocplib-endian ]; + + checkInputs = [ alcotest ]; + + doCheck = true; + + meta = { + description = "Fast MessagePack (http://msgpack.org) library "; + license = lib.licenses.isc; + homepage = "https://github.com/vbmithr/ocaml-msgpck"; + maintainers = [ lib.maintainers.ulrikstrid ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30e461377c1d..31b4b12ba4ed 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9877,9 +9877,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 { }; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index fb9aa161a3e2..f7ce96f135fa 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1162,6 +1162,8 @@ let mparser-pcre = callPackage ../development/ocaml-modules/mparser/pcre.nix { }; + msgpck = callPackage ../development/ocaml-modules/msgpck { }; + mrmime = callPackage ../development/ocaml-modules/mrmime { }; mtime_1 = callPackage ../development/ocaml-modules/mtime/1_x.nix { };