diff options
Diffstat (limited to 'pkgs/development/ocaml-modules')
127 files changed, 903 insertions, 457 deletions
diff --git a/pkgs/development/ocaml-modules/apron/default.nix b/pkgs/development/ocaml-modules/apron/default.nix index 959a7203dfa9b..c9edfd62e06d9 100644 --- a/pkgs/development/ocaml-modules/apron/default.nix +++ b/pkgs/development/ocaml-modules/apron/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, perl, gmp, mpfr, ppl, ocaml, findlib, camlidl, mlgmpidl }: stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-apron-${version}"; + pname = "ocaml${ocaml.version}-apron"; version = "0.9.13"; src = fetchFromGitHub { owner = "antoinemine"; diff --git a/pkgs/development/ocaml-modules/arp/default.nix b/pkgs/development/ocaml-modules/arp/default.nix index d900f2b772e9c..e1daca1bc38d4 100644 --- a/pkgs/development/ocaml-modules/arp/default.nix +++ b/pkgs/development/ocaml-modules/arp/default.nix @@ -8,11 +8,11 @@ buildDunePackage rec { pname = "arp"; - version = "2.3.2"; + version = "3.0.0"; src = fetchurl { url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; - sha256 = "1s09ibj9v6pp2ckn96wxmn3mjifcj97asls5xc4zg75pflk0grgz"; + sha256 = "1x3l8v96ywc3wrcwbf0j04b8agap4fif0fz6ki2ndzx57yqcjszn"; }; minimumOCamlVersion = "4.06"; diff --git a/pkgs/development/ocaml-modules/astring/default.nix b/pkgs/development/ocaml-modules/astring/default.nix index ba8cd98327fa5..8ecac1c124d6c 100644 --- a/pkgs/development/ocaml-modules/astring/default.nix +++ b/pkgs/development/ocaml-modules/astring/default.nix @@ -14,7 +14,7 @@ let in stdenv.mkDerivation { - name = "ocaml${ocaml.version}-astring-${param.version}"; + pname = "ocaml${ocaml.version}-astring"; inherit (param) version; src = fetchurl { diff --git a/pkgs/development/ocaml-modules/bap/default.nix b/pkgs/development/ocaml-modules/bap/default.nix index c1cb7de2d1882..f8e07fd1265cb 100644 --- a/pkgs/development/ocaml-modules/bap/default.nix +++ b/pkgs/development/ocaml-modules/bap/default.nix @@ -15,7 +15,7 @@ then throw "BAP is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-bap-${version}"; + pname = "ocaml${ocaml.version}-bap"; version = "2.2.0"; src = fetchFromGitHub { owner = "BinaryAnalysisPlatform"; @@ -32,8 +32,8 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; setupHook = writeText "setupHook.sh" '' - export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/" - export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}-llvm-plugins/" + export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/ocaml${ocaml.version}-bap-${version}/" + export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/ocaml${ocaml.version}-bap-${version}-llvm-plugins/" ''; nativeBuildInputs = [ which makeWrapper ]; @@ -49,6 +49,7 @@ stdenv.mkDerivation rec { piqi-ocaml uuidm frontc yojson ]; installPhase = '' + runHook preInstall export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR; export PATH=$PATH:$out/bin export CAML_LD_LIBRARY_PATH=''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}$OCAMLFIND_DESTDIR/bap-plugin-llvm/:$OCAMLFIND_DESTDIR/bap/ @@ -58,6 +59,7 @@ stdenv.mkDerivation rec { makeWrapper ${utop}/bin/utop $out/bin/baptop --prefix OCAMLPATH : $OCAMLPATH --prefix PATH : $PATH --add-flags "-ppx ppx-bap -short-paths -require \"bap.top\"" wrapProgram $out/bin/bapbuild --prefix OCAMLPATH : $OCAMLPATH --prefix PATH : $PATH ln -s $sigs $out/share/bap/sigs.zip + runHook postInstall ''; disableIda = "--disable-ida"; diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix index d2edb69e1b947..69e8289df2cd7 100644 --- a/pkgs/development/ocaml-modules/batteries/default.nix +++ b/pkgs/development/ocaml-modules/batteries/default.nix @@ -6,10 +6,9 @@ if !lib.versionAtLeast ocaml.version "4.02" then throw "batteries is not available for OCaml ${ocaml.version}" else -let version = "3.4.0"; in - -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-batteries-${version}"; +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-batteries"; + version = "3.4.0"; src = fetchFromGitHub { owner = "ocaml-batteries-team"; diff --git a/pkgs/development/ocaml-modules/benchmark/default.nix b/pkgs/development/ocaml-modules/benchmark/default.nix index 07432dd7c6e7f..3397821319e32 100644 --- a/pkgs/development/ocaml-modules/benchmark/default.nix +++ b/pkgs/development/ocaml-modules/benchmark/default.nix @@ -1,9 +1,8 @@ { stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild, ocaml_pcre }: -let version = "1.4"; in - -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-benchmark-${version}"; +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-benchmark"; + version = "1.4"; src = fetchzip { url = "https://github.com/Chris00/ocaml-benchmark/releases/download/${version}/benchmark-${version}.tar.gz"; diff --git a/pkgs/development/ocaml-modules/bigarray-compat/default.nix b/pkgs/development/ocaml-modules/bigarray-compat/default.nix index 487249ce5ae58..fd690cfdd5b3f 100644 --- a/pkgs/development/ocaml-modules/bigarray-compat/default.nix +++ b/pkgs/development/ocaml-modules/bigarray-compat/default.nix @@ -6,6 +6,8 @@ buildDunePackage rec { useDune2 = true; + minimalOCamlVersion = "4.02"; + src = fetchFromGitHub { owner = "mirage"; repo = pname; diff --git a/pkgs/development/ocaml-modules/bls12-381/default.nix b/pkgs/development/ocaml-modules/bls12-381/default.nix index e7426cf10e9d3..0568f89903205 100644 --- a/pkgs/development/ocaml-modules/bls12-381/default.nix +++ b/pkgs/development/ocaml-modules/bls12-381/default.nix @@ -1,21 +1,26 @@ -{ lib, buildDunePackage, bls12-381-gen, ff-sig, zarith, ctypes, alcotest }: +{ lib, buildDunePackage, fetchFromGitLab, ff-sig, zarith }: buildDunePackage rec { pname = "bls12-381"; + version = "1.1.0"; - inherit (bls12-381-gen) version src useDune2 doCheck; + src = fetchFromGitLab { + owner = "dannywillems"; + repo = "ocaml-bls12-381"; + rev = "22247018c0651ea62ae898c8ffcc388cc73f758f"; + sha256 = "ku6Rc+/lwFDoHTZTxgkhiF+kLkagi7944ntcu9vXWgI="; + }; + + useDune2 = true; minimalOCamlVersion = "4.08"; + propagatedBuildInputs = [ ff-sig zarith - ctypes - bls12-381-gen ]; - checkInputs = [ - alcotest - ]; + doCheck = true; meta = { homepage = "https://gitlab.com/dannywillems/ocaml-bls12-381"; diff --git a/pkgs/development/ocaml-modules/bls12-381/gen.nix b/pkgs/development/ocaml-modules/bls12-381/gen.nix index d7daba263c65e..7949fe20438a3 100644 --- a/pkgs/development/ocaml-modules/bls12-381/gen.nix +++ b/pkgs/development/ocaml-modules/bls12-381/gen.nix @@ -2,14 +2,15 @@ buildDunePackage rec { pname = "bls12-381-gen"; - version = "0.4.2"; + version = "0.4.4"; src = fetchFromGitLab { - owner = "dannywillems"; - repo = "ocaml-bls12-381"; - rev = version; - sha256 = "0jxc8qrdn74brmzjns1xycv3cb257kx5pa3ripgl9ci4njkv87n2"; + owner = "dannywillems"; + repo = "ocaml-bls12-381"; + rev = "${version}-legacy"; + sha256 = "qocIfQdv9rniOUykRulu2zWsqkzT0OrsGczgVKALRuk="; }; + useDune2 = true; minimalOCamlVersion = "4.08"; diff --git a/pkgs/development/ocaml-modules/bls12-381/legacy.nix b/pkgs/development/ocaml-modules/bls12-381/legacy.nix new file mode 100644 index 0000000000000..c72157c677e72 --- /dev/null +++ b/pkgs/development/ocaml-modules/bls12-381/legacy.nix @@ -0,0 +1,38 @@ +{ lib +, buildDunePackage +, fetchFromGitLab +, bls12-381-gen +, ctypes +, ff-pbt +, ff-sig +, tezos-rust-libs +, zarith +, alcotest +}: + +buildDunePackage rec { + pname = "bls12-381-legacy"; + + inherit (bls12-381-gen) version src useDune2 doCheck; + + minimalOCamlVersion = "4.08"; + + propagatedBuildInputs = [ + bls12-381-gen + ctypes + ff-pbt + ff-sig + tezos-rust-libs + zarith + ]; + + checkInputs = [ + alcotest + ]; + + meta = { + homepage = "https://gitlab.com/dannywillems/ocaml-bls12-381"; + description = "UNIX version of BLS12-381 primitives, not implementating the virtual package bls12-381"; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/development/ocaml-modules/bls12-381/unix.nix b/pkgs/development/ocaml-modules/bls12-381/unix.nix index 4da1a489e2c85..3ac3bb5d99f24 100644 --- a/pkgs/development/ocaml-modules/bls12-381/unix.nix +++ b/pkgs/development/ocaml-modules/bls12-381/unix.nix @@ -1,45 +1,31 @@ { lib , buildDunePackage -, rustc -, cargo -, dune-configurator , bls12-381 -, bls12-381-gen -, ff-pbt -, ff-sig +, hex +, integers , zarith -, ctypes -, tezos-rust-libs , alcotest +, bisect_ppx +, ff-pbt }: buildDunePackage { pname = "bls12-381-unix"; - inherit (bls12-381-gen) version src useDune2 doCheck; - - checkInputs = [ - alcotest - ff-pbt - ]; - - buildInputs = [ - rustc - cargo - dune-configurator - ]; + inherit (bls12-381) version src useDune2 doCheck; propagatedBuildInputs = [ - ff-sig - zarith - ctypes - bls12-381-gen bls12-381 - tezos-rust-libs + hex + integers + zarith ]; - # This is a hack to work around the hack used in the dune files - OPAM_SWITCH_PREFIX = "${tezos-rust-libs}"; + checkInputs = [ + alcotest + bisect_ppx + ff-pbt + ]; meta = { description = "UNIX version of BLS12-381 primitives implementing the virtual package bls12-381"; diff --git a/pkgs/development/ocaml-modules/bos/default.nix b/pkgs/development/ocaml-modules/bos/default.nix index 62438526d703d..17a0185829e9d 100644 --- a/pkgs/development/ocaml-modules/bos/default.nix +++ b/pkgs/development/ocaml-modules/bos/default.nix @@ -3,8 +3,9 @@ }: stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-bos-${version}"; + pname = "ocaml${ocaml.version}-bos"; version = "0.2.0"; + src = fetchurl { url = "https://erratique.ch/software/bos/releases/bos-${version}.tbz"; sha256 = "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc"; diff --git a/pkgs/development/ocaml-modules/ca-certs-nss/default.nix b/pkgs/development/ocaml-modules/ca-certs-nss/default.nix index 2835852d6708f..987c325ee00ee 100644 --- a/pkgs/development/ocaml-modules/ca-certs-nss/default.nix +++ b/pkgs/development/ocaml-modules/ca-certs-nss/default.nix @@ -14,13 +14,13 @@ buildDunePackage rec { pname = "ca-certs-nss"; - version = "3.71.0.1"; + version = "3.74"; minimumOCamlVersion = "4.08"; src = fetchurl { - url = "https://github.com/mirage/ca-certs-nss/releases/download/v${version}/ca-certs-nss-v${version}.tbz"; - sha256 = "b83749d983781631745079dccb7345d9ee1b52c1844ce865e97a25349289a124"; + url = "https://github.com/mirage/ca-certs-nss/releases/download/v${version}/ca-certs-nss-${version}.tbz"; + sha256 = "c95f5b2e36a0564e6f65421e0e197d7cfe600d19eb492f8f27c4841cbe68b231"; }; useDune2 = true; diff --git a/pkgs/development/ocaml-modules/ca-certs/default.nix b/pkgs/development/ocaml-modules/ca-certs/default.nix index acf869dbd275b..ce8993b465ebe 100644 --- a/pkgs/development/ocaml-modules/ca-certs/default.nix +++ b/pkgs/development/ocaml-modules/ca-certs/default.nix @@ -18,7 +18,8 @@ buildDunePackage rec { propagatedBuildInputs = [ bos fpath rresult ptime mirage-crypto x509 astring logs ]; - doCheck = true; + # Assumes nss-cacert < 3.74 https://github.com/mirage/ca-certs/issues/21 + doCheck = false; checkInputs = [ cacert # for /etc/ssl/certs/ca-bundle.crt alcotest diff --git a/pkgs/development/ocaml-modules/cairo2/default.nix b/pkgs/development/ocaml-modules/cairo2/default.nix index 0a9922f67885c..1801a0679b567 100644 --- a/pkgs/development/ocaml-modules/cairo2/default.nix +++ b/pkgs/development/ocaml-modules/cairo2/default.nix @@ -1,4 +1,5 @@ -{ stdenv, lib, fetchurl, buildDunePackage, ocaml, dune-configurator, pkg-config, cairo }: +{ stdenv, lib, fetchurl, buildDunePackage, ocaml, dune-configurator, pkg-config, cairo +, ApplicationServices }: buildDunePackage rec { pname = "cairo2"; @@ -13,7 +14,7 @@ buildDunePackage rec { useDune2 = true; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ cairo dune-configurator ]; + buildInputs = [ cairo dune-configurator ] ++ lib.optionals stdenv.isDarwin [ ApplicationServices ]; doCheck = !(stdenv.isDarwin # https://github.com/Chris00/ocaml-cairo/issues/19 diff --git a/pkgs/development/ocaml-modules/camlimages/4.2.4.nix b/pkgs/development/ocaml-modules/camlimages/4.2.4.nix index 8ed562a27e69f..b44fd7db6b31f 100644 --- a/pkgs/development/ocaml-modules/camlimages/4.2.4.nix +++ b/pkgs/development/ocaml-modules/camlimages/4.2.4.nix @@ -15,7 +15,8 @@ , ghostscript }: -assert lib.versionOlder ocaml.version "4.06"; +lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02" && lib.versionOlder ocaml.version "4.10") + "camlimages 4.2.4 is not available for OCaml ${ocaml.version}" stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-${pname}-${version}"; @@ -54,9 +55,9 @@ stdenv.mkDerivation rec { ''; installPhase = '' - runHook preBuild + runHook preInstall omake install - runHook postBuild + runHook postInstall ''; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/camlpdf/default.nix b/pkgs/development/ocaml-modules/camlpdf/default.nix index f496ce91c8261..42c27f15a5b1b 100644 --- a/pkgs/development/ocaml-modules/camlpdf/default.nix +++ b/pkgs/development/ocaml-modules/camlpdf/default.nix @@ -1,17 +1,18 @@ { lib, stdenv, fetchFromGitHub, which, ocaml, findlib }: -if !lib.versionAtLeast ocaml.version "4.02" +if !lib.versionAtLeast ocaml.version "4.10" then throw "camlpdf is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - version = "2.4"; - name = "ocaml${ocaml.version}-camlpdf-${version}"; + version = "2.5"; + pname = "ocaml${ocaml.version}-camlpdf"; + src = fetchFromGitHub { owner = "johnwhitington"; repo = "camlpdf"; rev = "v${version}"; - sha256 = "09kzrgmlxb567315p3fy59ba0kv7xhp548n9i3l4wf9n06p0ww9m"; + sha256 = "sha256:1qmsa0xgi960y7r20mvf8hxiiml7l1908s4dm7nq262f19w51gsl"; }; buildInputs = [ which ocaml findlib ]; diff --git a/pkgs/development/ocaml-modules/cpdf/default.nix b/pkgs/development/ocaml-modules/cpdf/default.nix index 2a0fae4a1dbbf..632430fe4f7fb 100644 --- a/pkgs/development/ocaml-modules/cpdf/default.nix +++ b/pkgs/development/ocaml-modules/cpdf/default.nix @@ -4,16 +4,15 @@ if !lib.versionAtLeast ocaml.version "4.10" then throw "cpdf is not available for OCaml ${ocaml.version}" else -let version = "2.4"; in - -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-cpdf-${version}"; +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-cpdf"; + version = "2.5"; src = fetchFromGitHub { owner = "johnwhitington"; repo = "cpdf-source"; rev = "v${version}"; - sha256 = "1a8lmfc76dr8x6pxgm4aypbys02pfma9yh4z3l1qxp2q1909na5l"; + sha256 = "sha256:1qmx229nij7g6qmiacmyy4mcgx3k9509p4slahivshqm79d6wiwl"; }; buildInputs = [ ocaml findlib ncurses ]; diff --git a/pkgs/development/ocaml-modules/crowbar/default.nix b/pkgs/development/ocaml-modules/crowbar/default.nix index e114e7d8433ae..3557c22bc1444 100644 --- a/pkgs/development/ocaml-modules/crowbar/default.nix +++ b/pkgs/development/ocaml-modules/crowbar/default.nix @@ -14,7 +14,10 @@ buildDunePackage rec { sha256 = "0wjfc9irvirfkic32ivvj6qb7r838w08b0d3vmngigbjpjyc9b14"; }; - minimumOCamlVersion = "4.08"; + minimalOCamlVersion = "4.08"; + + # Fix tests with pprint ≥ 20220103 + patches = [ ./pprint.patch ]; # disable xmldiff tests, so we don't need to package unmaintained and legacy pkgs postPatch = "rm -rf examples/xmldiff"; diff --git a/pkgs/development/ocaml-modules/crowbar/pprint.patch b/pkgs/development/ocaml-modules/crowbar/pprint.patch new file mode 100644 index 0000000000000..77fc073b77fa6 --- /dev/null +++ b/pkgs/development/ocaml-modules/crowbar/pprint.patch @@ -0,0 +1,22 @@ +commit 77b5e54d33a66445f45ddc48577d835207be8cef +Author: Stephen Dolan <stephen.dolan@cl.cam.ac.uk> +Date: Fri Jun 12 19:34:51 2020 +0100 + + Unbreak small example logic + +diff --git a/examples/pprint/test_pprint.ml b/examples/pprint/test_pprint.ml +index 77789ef..44124e7 100644 +--- a/examples/pprint/test_pprint.ml ++++ b/examples/pprint/test_pprint.ml +@@ -1,9 +1,9 @@ +-open Crowbar + open PPrint ++open Crowbar + type t = (string * PPrint.document) + let doc = fix (fun doc -> choose [ + const ("", empty); +- const ("a", char 'a'); ++ const ("a", PPrint.char 'a'); + const ("123", string "123"); + const ("Hello", string "Hello"); + const ("awordwhichisalittlebittoolong", diff --git a/pkgs/development/ocaml-modules/dbf/default.nix b/pkgs/development/ocaml-modules/dbf/default.nix new file mode 100644 index 0000000000000..d2dad611bf466 --- /dev/null +++ b/pkgs/development/ocaml-modules/dbf/default.nix @@ -0,0 +1,28 @@ +{ lib, buildDunePackage, fetchFromGitHub, ppx_cstruct, rresult, cstruct-unix +, core_kernel }: + +buildDunePackage rec { + pname = "dbf"; + version = "0.1.1"; + + minimalOCamlVersion = "4.08"; + + useDune2 = true; + + src = fetchFromGitHub { + owner = "pveber"; + repo = "dbf"; + rev = "${version}"; + sha256 = "sha256-h1K5YDLbXGEJi/quKXvSR0gZ+WkBzut7AsVFv+Bm8/g="; + }; + + buildInputs = [ ppx_cstruct ]; + propagatedBuildInputs = [ rresult cstruct-unix core_kernel ]; + + meta = with lib; { + description = "DBF format parsing"; + homepage = "https://github.com/pveber/dbf"; + license = licenses.isc; + maintainers = [ maintainers.deltadelta ]; + }; +} diff --git a/pkgs/development/ocaml-modules/digestif/default.nix b/pkgs/development/ocaml-modules/digestif/default.nix index e2501c60f5a14..2ddaec5c7c1d7 100644 --- a/pkgs/development/ocaml-modules/digestif/default.nix +++ b/pkgs/development/ocaml-modules/digestif/default.nix @@ -5,13 +5,13 @@ buildDunePackage rec { pname = "digestif"; - version = "1.0.0"; + version = "1.1.0"; useDune2 = true; src = fetchurl { url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-v${version}.tbz"; - sha256 = "11188ya6ksb0p0zvs6saz3qxv4a8pyy8m3sq35f3qfxrxhghqi99"; + sha256 = "01gwkbrznci4xdcbww4ysgsciz2qs0r8jsmhp0siwbcgcrf1jjv5"; }; propagatedBuildInputs = [ bigarray-compat eqaf stdlib-shims ]; diff --git a/pkgs/development/ocaml-modules/dum/default.nix b/pkgs/development/ocaml-modules/dum/default.nix index d8aa1f371f3b5..7bdaf2dfad903 100644 --- a/pkgs/development/ocaml-modules/dum/default.nix +++ b/pkgs/development/ocaml-modules/dum/default.nix @@ -3,7 +3,7 @@ }: stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-dum-${version}"; + pname = "ocaml${ocaml.version}-dum"; version = "1.0.1"; src = fetchFromGitHub { diff --git a/pkgs/development/ocaml-modules/elina/default.nix b/pkgs/development/ocaml-modules/elina/default.nix index 4eff6c2957de8..2ddef0f40529b 100644 --- a/pkgs/development/ocaml-modules/elina/default.nix +++ b/pkgs/development/ocaml-modules/elina/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { version = "1.1"; - name = "ocaml${ocaml.version}-elina-${version}"; + pname = "ocaml${ocaml.version}-elina"; src = fetchurl { url = "http://files.sri.inf.ethz.ch/elina-${version}.tar.gz"; sha256 = "1nymykskq1yx87y4xl6hl9i4q6kv0qaq25rniqgl1bfn883p1ysc"; diff --git a/pkgs/development/ocaml-modules/elpi/default.nix b/pkgs/development/ocaml-modules/elpi/default.nix index 4412f568508c7..0770f3a48d484 100644 --- a/pkgs/development/ocaml-modules/elpi/default.nix +++ b/pkgs/development/ocaml-modules/elpi/default.nix @@ -2,11 +2,12 @@ , re, perl, ncurses , ppxlib, ppx_deriving , ppxlib_0_15, ppx_deriving_0_15 -, version ? "1.13.7" +, version ? "1.14.1" }: with lib; let fetched = import ../../../build-support/coq/meta-fetch/default.nix {inherit lib stdenv fetchzip; } ({ + release."1.14.1".sha256 = "sha256-BZPVL8ymjrE9kVGyf6bpc+GA2spS5JBpkUtZi04nPis="; release."1.13.7".sha256 = "10fnwz30bsvj7ii1vg4l1li5pd7n0qqmwj18snkdr5j9gk0apc1r"; release."1.13.5".sha256 = "02a6r23mximrdvs6kgv6rp0r2dgk7zynbs99nn7lphw2c4189kka"; release."1.13.1".sha256 = "12a9nbdvg9gybpw63lx3nw5wnxfznpraprb0wj3l68v1w43xq044"; diff --git a/pkgs/development/ocaml-modules/erm_xmpp/default.nix b/pkgs/development/ocaml-modules/erm_xmpp/default.nix index 9eaad7575ec30..3447d590ea23a 100644 --- a/pkgs/development/ocaml-modules/erm_xmpp/default.nix +++ b/pkgs/development/ocaml-modules/erm_xmpp/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { version = "0.3+20200317"; - name = "ocaml${ocaml.version}-erm_xmpp-${version}"; + pname = "ocaml${ocaml.version}-erm_xmpp"; src = fetchFromGitHub { owner = "hannesm"; diff --git a/pkgs/development/ocaml-modules/ethernet/default.nix b/pkgs/development/ocaml-modules/ethernet/default.nix index bc4f4a4754479..59c581e128aed 100644 --- a/pkgs/development/ocaml-modules/ethernet/default.nix +++ b/pkgs/development/ocaml-modules/ethernet/default.nix @@ -5,16 +5,16 @@ buildDunePackage rec { pname = "ethernet"; - version = "2.2.0"; + version = "3.0.0"; - minimumOCamlVersion = "4.06"; + minimumOCamlVersion = "4.08"; # necessary due to cstruct useDune2 = true; src = fetchurl { url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; - sha256 = "0qzisqibx2gd8rh330n642mk5wz229199rnlrs7x8cr5pnymif7z"; + sha256 = "0a898vp9dw42majsvzzvs8pc6x4ns01wlwhwbacixliv6vv78ng9"; }; nativeBuildInputs = [ diff --git a/pkgs/development/ocaml-modules/expat/default.nix b/pkgs/development/ocaml-modules/expat/default.nix index 1812473e78bfc..e951acaa71a5f 100644 --- a/pkgs/development/ocaml-modules/expat/default.nix +++ b/pkgs/development/ocaml-modules/expat/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }: stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-expat-${version}"; + pname = "ocaml${ocaml.version}-expat"; version = "1.1.0"; src = fetchFromGitHub { diff --git a/pkgs/development/ocaml-modules/farfadet/default.nix b/pkgs/development/ocaml-modules/farfadet/default.nix index 77eef7f29a98c..79b742da575d8 100644 --- a/pkgs/development/ocaml-modules/farfadet/default.nix +++ b/pkgs/development/ocaml-modules/farfadet/default.nix @@ -7,7 +7,7 @@ then throw "farfadet is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-farfadet-${version}"; + pname = "ocaml${ocaml.version}-farfadet"; version = "0.3"; src = fetchurl { diff --git a/pkgs/development/ocaml-modules/fix/default.nix b/pkgs/development/ocaml-modules/fix/default.nix index ffd0b5003ce40..e960167c869d4 100644 --- a/pkgs/development/ocaml-modules/fix/default.nix +++ b/pkgs/development/ocaml-modules/fix/default.nix @@ -2,14 +2,14 @@ buildDunePackage rec { pname = "fix"; - version = "20201120"; + version = "20211231"; src = fetchFromGitLab { domain = "gitlab.inria.fr"; owner = "fpottier"; repo = "fix"; rev = "${version}"; - sha256 = "sha256-RO+JCG6R2i5uZfwTYEnQBCVq963fjv5lA2wA/8KrgMg="; + sha256 = "sha256-T/tbiC95yzPb60AiEcvMRU47D8xUZNN5C4X33Y1VB9E="; }; minimumOCamlVersion = "4.03"; @@ -18,7 +18,7 @@ buildDunePackage rec { meta = with lib; { homepage = "https://gitlab.inria.fr/fpottier/fix/"; description = "A simple OCaml module for computing the least solution of a system of monotone equations"; - license = licenses.cecill-c; + license = licenses.lgpl2Only; maintainers = with maintainers; [ vbgl ]; }; } diff --git a/pkgs/development/ocaml-modules/frontc/default.nix b/pkgs/development/ocaml-modules/frontc/default.nix index e68f6a28cb472..bc74a5b58a082 100644 --- a/pkgs/development/ocaml-modules/frontc/default.nix +++ b/pkgs/development/ocaml-modules/frontc/default.nix @@ -8,13 +8,13 @@ let in stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-FrontC-${version}"; + pname = "ocaml${ocaml.version}-FrontC"; version = "3.4.1"; src = fetchFromGitHub { owner = "BinaryAnalysisPlatform"; repo = "FrontC"; - rev = "V_3_4_1"; + rev = "V_${lib.replaceStrings ["."] ["_"] version}"; sha256 = "1dq5nks0c9gsbr1m8k39m1bniawr5hqcy1r8x5px7naa95ch06ak"; }; diff --git a/pkgs/development/ocaml-modules/functory/default.nix b/pkgs/development/ocaml-modules/functory/default.nix index 2f11001874f17..959963c4752a6 100644 --- a/pkgs/development/ocaml-modules/functory/default.nix +++ b/pkgs/development/ocaml-modules/functory/default.nix @@ -13,8 +13,8 @@ let param = in stdenv.mkDerivation { - - name = "ocaml${ocaml.version}-functory-${param.version}"; + pname = "ocaml${ocaml.version}-functory"; + inherit (param) version; src = fetchurl { url = "https://www.lri.fr/~filliatr/functory/download/functory-${param.version}.tar.gz"; diff --git a/pkgs/development/ocaml-modules/gtktop/default.nix b/pkgs/development/ocaml-modules/gtktop/default.nix deleted file mode 100644 index e1afefc6a79f4..0000000000000 --- a/pkgs/development/ocaml-modules/gtktop/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, lib, fetchurl, ocaml, camlp4, findlib, lablgtk-extras }: - -let pname = "gtktop-2.0"; in - -if lib.versionAtLeast ocaml.version "4.06" -then throw "${pname} is not available for OCaml ${ocaml.version}" -else - -stdenv.mkDerivation { - name = "ocaml-${pname}"; - - src = fetchurl { - url = "http://zoggy.github.io/gtktop/${pname}.tar.gz"; - sha256 = "0cpmnavvham9mwxknm6df90g9qxabcvn2kfwlf9mncqa0z3rknz6"; - }; - - buildInputs = [ ocaml camlp4 findlib ]; - propagatedBuildInputs = [ lablgtk-extras ]; - - createFindlibDestdir = true; - - meta = { - homepage = "http://zoggy.github.io/gtktop/"; - description = "A small OCaml library to ease the creation of graphical toplevels"; - license = lib.licenses.lgpl3; - maintainers = with lib.maintainers; [ vbgl ]; - platforms = ocaml.meta.platforms or []; - }; -} diff --git a/pkgs/development/ocaml-modules/hacl-star/raw.nix b/pkgs/development/ocaml-modules/hacl-star/raw.nix index aa787c9a91a07..c7852338253ce 100644 --- a/pkgs/development/ocaml-modules/hacl-star/raw.nix +++ b/pkgs/development/ocaml-modules/hacl-star/raw.nix @@ -2,17 +2,17 @@ stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-hacl-star-raw"; - version = "0.3.2"; + version = "0.4.5"; src = fetchzip { url = "https://github.com/project-everest/hacl-star/releases/download/ocaml-v${version}/hacl-star.${version}.tar.gz"; - sha256 = "1wp27vf0g43ggs7cv85hpa62jjvzkwzzg5rfznbwac6j6yr17zc7"; + sha256 = "1330vgbf5krlkvifby96kyk13xhmihajk2w5hgf2761jrljmnnrs"; stripRoot = false; }; sourceRoot = "./source/raw"; - minimalOCamlVersion = "4.05"; + minimalOCamlVersion = "4.08"; postPatch = '' patchShebangs ./ diff --git a/pkgs/development/ocaml-modules/httpaf/default.nix b/pkgs/development/ocaml-modules/httpaf/default.nix index fbc21108bd025..94cee795b93c5 100644 --- a/pkgs/development/ocaml-modules/httpaf/default.nix +++ b/pkgs/development/ocaml-modules/httpaf/default.nix @@ -4,7 +4,7 @@ buildDunePackage rec { pname = "httpaf"; - version = "0.6.6"; + version = "0.7.1"; useDune2 = true; @@ -12,17 +12,9 @@ buildDunePackage rec { owner = "inhabitedtype"; repo = pname; rev = version; - sha256 = "065ikryv8zw9cbk6ddcjcind88ckk0inz9m3sqj9nwyfw4v4scm6"; + sha256 = "0zk78af3qyvf6w66mg8sxygr6ndayzqw5s3zfxibvn121xwni26z"; }; - patches = [ - # Fix tests with angstrom ≥ 0.14 - (fetchpatch { - url = "https://github.com/inhabitedtype/httpaf/commit/fc0de5f2f1bd8df953ae4d4c9a61032392436c84.patch"; - sha256 = "1a8ca76ifbgyaq1bqfyq18mmxinjjparzkrr7ljbj0y1z1rl748z"; - }) - ]; - checkInputs = [ alcotest ]; propagatedBuildInputs = [ angstrom faraday ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/index/default.nix b/pkgs/development/ocaml-modules/index/default.nix index 8e503f5ddd25e..34b2ee668ea86 100644 --- a/pkgs/development/ocaml-modules/index/default.nix +++ b/pkgs/development/ocaml-modules/index/default.nix @@ -1,19 +1,19 @@ { lib, fetchurl, buildDunePackage , repr, ppx_repr, fmt, logs, mtime, stdlib-shims , cmdliner, progress, semaphore-compat, optint -, alcotest, crowbar, re +, alcotest, crowbar, re, lru }: buildDunePackage rec { pname = "index"; - version = "1.4.0"; + version = "1.5.0"; src = fetchurl { url = "https://github.com/mirage/index/releases/download/${version}/index-${version}.tbz"; - sha256 = "13xd858c50fs651p1y8x70323ff0gzbf6zgc0a25f6xh3rsmkn4c"; + sha256 = "1q1lv960dk1br8nz8gkibdywl2wv64ywib7b9jn33f6mpb81qc9f"; }; - minimumOCamlVersion = "4.08"; + minimalOCamlVersion = "4.08"; useDune2 = true; buildInputs = [ @@ -29,6 +29,7 @@ buildDunePackage rec { repr semaphore-compat optint + lru ]; checkInputs = [ diff --git a/pkgs/development/ocaml-modules/inotify/default.nix b/pkgs/development/ocaml-modules/inotify/default.nix index 8910b720a8473..e8289d929637a 100644 --- a/pkgs/development/ocaml-modules/inotify/default.nix +++ b/pkgs/development/ocaml-modules/inotify/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "2.3"; - name = "ocaml${ocaml.version}-inotify-${version}"; + pname = "ocaml${ocaml.version}-inotify"; src = fetchFromGitHub { owner = "whitequark"; diff --git a/pkgs/development/ocaml-modules/irmin/default.nix b/pkgs/development/ocaml-modules/irmin/default.nix index fe13377b3c2b1..447024f6e120c 100644 --- a/pkgs/development/ocaml-modules/irmin/default.nix +++ b/pkgs/development/ocaml-modules/irmin/default.nix @@ -1,6 +1,6 @@ { lib, buildDunePackage , astring, digestif, fmt, jsonm, logs, ocaml_lwt, ocamlgraph, uri -, repr, ppx_irmin, bheap +, repr, ppx_irmin, bheap, uutf }: buildDunePackage { @@ -9,7 +9,7 @@ buildDunePackage { inherit (ppx_irmin) src version; useDune2 = true; - minimumOCamlVersion = "4.07"; + minimumOCamlVersion = "4.08"; propagatedBuildInputs = [ astring @@ -23,6 +23,7 @@ buildDunePackage { repr bheap ppx_irmin + uutf ]; # circular dependency on irmin-mem diff --git a/pkgs/development/ocaml-modules/irmin/ppx.nix b/pkgs/development/ocaml-modules/irmin/ppx.nix index 8d57e18dc8145..2eecc3a1e5e6b 100644 --- a/pkgs/development/ocaml-modules/irmin/ppx.nix +++ b/pkgs/development/ocaml-modules/irmin/ppx.nix @@ -2,11 +2,11 @@ buildDunePackage rec { pname = "ppx_irmin"; - version = "2.7.2"; + version = "2.9.1"; src = fetchurl { url = "https://github.com/mirage/irmin/releases/download/${version}/irmin-${version}.tbz"; - sha256 = "29c68c5001a727aaa7a6842d6204ffa3e24b3544fa4f6af2234cdbfa032f7fdf"; + sha256 = "10r7j4z4gx3dp48lavjhpb1cam27n6ch751amslb0drphy53l00n"; }; minimumOCamlVersion = "4.08"; diff --git a/pkgs/development/ocaml-modules/janestreet/default.nix b/pkgs/development/ocaml-modules/janestreet/default.nix index 679ef4a58e488..ee906a7225017 100644 --- a/pkgs/development/ocaml-modules/janestreet/default.nix +++ b/pkgs/development/ocaml-modules/janestreet/default.nix @@ -299,9 +299,9 @@ with self; }; core = janePackage { - version = "0.11.2"; + version = "0.11.3"; pname = "core"; - hash = "0vpsvd75lxb09il2rnzyib9mlr51v1hzqdc9fdxgx353pb5agh8a"; + hash = "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"; propagatedBuildInputs = [ core_kernel spawn ]; meta.description = "Jane Street's standard library overlay"; }; diff --git a/pkgs/development/ocaml-modules/jsonm/default.nix b/pkgs/development/ocaml-modules/jsonm/default.nix index 78a081619b27d..c228242fda9ea 100644 --- a/pkgs/development/ocaml-modules/jsonm/default.nix +++ b/pkgs/development/ocaml-modules/jsonm/default.nix @@ -1,9 +1,8 @@ { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf }: -let version = "1.0.1"; in - -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-jsonm-${version}"; +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-jsonm"; + version = "1.0.1"; src = fetchurl { url = "https://erratique.ch/software/jsonm/releases/jsonm-${version}.tbz"; diff --git a/pkgs/development/ocaml-modules/lablgtk-extras/default.nix b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix index 373e5ded952a8..d97f2f5bffd26 100644 --- a/pkgs/development/ocaml-modules/lablgtk-extras/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix @@ -7,7 +7,7 @@ else stdenv.mkDerivation rec { version = "1.6"; - name = "ocaml${ocaml.version}-lablgtk-extras-${version}"; + pname = "ocaml${ocaml.version}-lablgtk-extras"; src = fetchFromGitLab { domain = "framagit.org"; owner = "zoggy"; diff --git a/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix index 232621ad83ba6..f64b6571970ba 100644 --- a/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix +++ b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, ocaml, findlib, pkg-config, gtk2, libgnomecanvas, libglade, gtksourceview, camlp4 }: +{ stdenv, lib, fetchurl, ocaml, findlib, pkg-config, gtk2, libgnomecanvas, gtksourceview, camlp4 }: if lib.versionAtLeast ocaml.version "4.04" then throw "lablgtk-2.14 is not available for OCaml ${ocaml.version}" else @@ -17,7 +17,7 @@ stdenv.mkDerivation (rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ocaml findlib gtk2 libgnomecanvas libglade gtksourceview camlp4 ]; + buildInputs = [ ocaml findlib gtk2 libgnomecanvas gtksourceview camlp4 ]; configureFlags = [ "--with-libdir=$(out)/lib/ocaml/${ocaml.version}/site-lib" ]; buildFlags = [ "world" ]; diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix index 09487ac9dad74..a442ae35aa52d 100644 --- a/pkgs/development/ocaml-modules/lablgtk/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk/default.nix @@ -1,14 +1,14 @@ -{ lib, stdenv, fetchurl, fetchFromGitHub, ocaml, findlib, pkg-config, gtk2, libgnomecanvas, libglade, gtksourceview }: +{ lib, stdenv, fetchurl, fetchFromGitHub, ocaml, findlib, pkg-config, gtk2, libgnomecanvas, gtksourceview }: let param = let check = lib.versionAtLeast ocaml.version; in if check "4.06" then rec { - version = "2.18.10"; + version = "2.18.12"; src = fetchFromGitHub { owner = "garrigue"; repo = "lablgtk"; rev = version; - sha256 = "0w8cdfcv2wc19sd3qzj3qq77qc6rbnbynsz02gzbl15kgrvgrfxi"; + sha256 = "sha256:0asib87c42apwf1ln8541x6i3mvyajqbarifvz11in0mqn5k7g7h"; }; } else if check "3.12" then { version = "2.18.5"; @@ -24,7 +24,7 @@ stdenv.mkDerivation { inherit (param) version src; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ocaml findlib gtk2 libgnomecanvas libglade gtksourceview ]; + buildInputs = [ ocaml findlib gtk2 libgnomecanvas gtksourceview ]; configureFlags = [ "--with-libdir=$(out)/lib/ocaml/${ocaml.version}/site-lib" ]; buildFlags = [ "world" ]; diff --git a/pkgs/development/ocaml-modules/lablgtk3/default.nix b/pkgs/development/ocaml-modules/lablgtk3/default.nix index b14f5b736b45a..81fb51d1f1e25 100644 --- a/pkgs/development/ocaml-modules/lablgtk3/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk3/default.nix @@ -1,18 +1,25 @@ -{ lib, fetchurl, pkg-config, buildDunePackage, dune-configurator, gtk3, cairo2 }: +{ lib, fetchFromGitHub, fetchpatch, pkg-config, buildDunePackage, dune-configurator, gtk3, cairo2 }: buildDunePackage rec { - version = "3.1.1"; + version = "3.1.2"; pname = "lablgtk3"; useDune2 = true; - minimumOCamlVersion = "4.05"; + minimalOCamlVersion = "4.05"; - src = fetchurl { - url = "https://github.com/garrigue/lablgtk/releases/download/${version}/lablgtk3-${version}.tbz"; - sha256 = "1ygc1yh99gh44h958yffw1vxdlfpn799d4x1s36c2jfbi8f0dir2"; + src = fetchFromGitHub { + owner = "garrigue"; + repo = "lablgtk"; + rev = version; + sha256 = "sha256:0b17w9qb1f02h3313cm62mrqlhwxficppzm72n7sf8mmwrylxbm7"; }; + patches = [ (fetchpatch { + name = "dune-project.patch"; + url = "https://raw.githubusercontent.com/ocaml/opam-repository/10a48cb9fab88f67f6cb70280e0fec035c32d41c/packages/lablgtk3/lablgtk3.3.1.2/files/dune-project.patch"; + sha256 = "03jf5hclqdq7iq84djaqcnfnnnd7z3hb48rr8n1gyxzjyx86b3fh"; + }) ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ gtk3 cairo2 ]; diff --git a/pkgs/development/ocaml-modules/labltk/default.nix b/pkgs/development/ocaml-modules/labltk/default.nix index bef06975ac553..971668ce0e11e 100644 --- a/pkgs/development/ocaml-modules/labltk/default.nix +++ b/pkgs/development/ocaml-modules/labltk/default.nix @@ -49,7 +49,7 @@ in stdenv.mkDerivation rec { inherit (param) version src; - name = "ocaml${ocaml.version}-labltk-${version}"; + pname = "ocaml${ocaml.version}-labltk"; buildInputs = [ ocaml findlib tcl tk makeWrapper ]; diff --git a/pkgs/development/ocaml-modules/llvm/default.nix b/pkgs/development/ocaml-modules/llvm/default.nix index 3357b99cebfc7..264d95f39f67e 100644 --- a/pkgs/development/ocaml-modules/llvm/default.nix +++ b/pkgs/development/ocaml-modules/llvm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, python, cmake, libllvm, ocaml, findlib, ctypes }: +{ stdenv, lib, python2, cmake, libllvm, ocaml, findlib, ctypes }: let version = lib.getVersion libllvm; in @@ -9,7 +9,7 @@ stdenv.mkDerivation { inherit (libllvm) src; nativeBuildInputs = [ cmake ]; - buildInputs = [ python ocaml findlib ctypes ]; + buildInputs = [ python2 ocaml findlib ctypes ]; propagatedBuildInputs = [ libllvm ]; cmakeFlags = [ diff --git a/pkgs/development/ocaml-modules/lustre-v6/default.nix b/pkgs/development/ocaml-modules/lustre-v6/default.nix index 34feaf85c3f38..4eeb01e9f3b4f 100644 --- a/pkgs/development/ocaml-modules/lustre-v6/default.nix +++ b/pkgs/development/ocaml-modules/lustre-v6/default.nix @@ -20,7 +20,7 @@ buildDunePackage rec { ]; meta = with lib; { - homepage = "http://www-verimag.imag.fr/lustre-v6.html"; + homepage = "https://www-verimag.imag.fr/lustre-v6.html"; description = "Lustre V6 compiler"; license = lib.licenses.cecill21; maintainers = [ lib.maintainers.delta ]; diff --git a/pkgs/development/ocaml-modules/luv/default.nix b/pkgs/development/ocaml-modules/luv/default.nix index fec487aeac20f..4b11e8df98566 100644 --- a/pkgs/development/ocaml-modules/luv/default.nix +++ b/pkgs/development/ocaml-modules/luv/default.nix @@ -6,12 +6,12 @@ buildDunePackage rec { pname = "luv"; - version = "0.5.10"; + version = "0.5.11"; useDune2 = true; src = fetchurl { url = "https://github.com/aantron/luv/releases/download/${version}/luv-${version}.tar.gz"; - sha256 = "0zygir01d6vglfs4b3klnbg90glvyl9agq5xnzn8hmsb6d8z0jqp"; + sha256 = "sha256-zOz0cxGzhLi3Q36qyStNCz8JGXHtECQfZysMKiyKOkM="; }; postConfigure = '' diff --git a/pkgs/development/ocaml-modules/lwt/ppx.nix b/pkgs/development/ocaml-modules/lwt/ppx.nix index 2df17844d1a06..1ba21af864bb1 100644 --- a/pkgs/development/ocaml-modules/lwt/ppx.nix +++ b/pkgs/development/ocaml-modules/lwt/ppx.nix @@ -1,4 +1,4 @@ -{ fetchzip, buildDunePackage, lwt, ppxlib }: +{ fetchFromGitHub, buildDunePackage, lwt, ppxlib }: buildDunePackage { pname = "lwt_ppx"; @@ -8,16 +8,18 @@ buildDunePackage { minimumOCamlVersion = "4.04"; - src = fetchzip { - # `lwt_ppx` has a different release cycle than Lwt, but it's included in - # one of its release bundles. - # Because there could exist an Lwt release _without_ a `lwt_ppx` release, - # this `src` field doesn't inherit from the Lwt derivation. - # - # This is particularly useful for overriding Lwt without breaking `lwt_ppx`, - # as new Lwt releases may contain broken `lwt_ppx` code. - url = "https://github.com/ocsigen/lwt/archive/5.4.0.tar.gz"; - sha256 = "1ay1zgadnw19r9hl2awfjr22n37l7rzxd9v73pjbahavwm2ay65d"; + # `lwt_ppx` has a different release cycle than Lwt, but it's included in + # one of its release bundles. + # Because there could exist an Lwt release _without_ a `lwt_ppx` release, + # this `src` field doesn't inherit from the Lwt derivation. + # + # This is particularly useful for overriding Lwt without breaking `lwt_ppx`, + # as new Lwt releases may contain broken `lwt_ppx` code. + src = fetchFromGitHub { + owner = "ocsigen"; + repo = "lwt"; + rev = "5.4.0"; + sha256 = "sha256-rRivROVbQbXkHWen1n8+9AwrRJaOK0Fhyilw29T7was="; }; propagatedBuildInputs = [ lwt ppxlib ]; diff --git a/pkgs/development/ocaml-modules/lwt_react/default.nix b/pkgs/development/ocaml-modules/lwt_react/default.nix index 5513935133e8c..f6f2bc0f4ef3c 100644 --- a/pkgs/development/ocaml-modules/lwt_react/default.nix +++ b/pkgs/development/ocaml-modules/lwt_react/default.nix @@ -1,22 +1,24 @@ -{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, lwt, react }: +{ lib, buildDunePackage, fetchFromGitHub, cppo, lwt, react }: -stdenv.mkDerivation rec { - version = "1.0.1"; - name = "ocaml${ocaml.version}-lwt_react-${version}"; - src = fetchzip { - url = "https://github.com/ocsigen/lwt/releases/download/3.0.0/lwt_react-1.0.1.tar.gz"; - sha256 = "1bbz7brvdskf4angzn3q2s2s6qdnx7x8m8syayysh23gwv4c7v31"; +buildDunePackage { + pname = "lwt_react"; + version = "1.1.5"; + + useDune2 = true; + + src = fetchFromGitHub { + owner = "ocsigen"; + repo = "lwt"; + rev = "5.5.0"; + sha256 = "sha256:1jbjz2rsz3j56k8vh5qlmm87hhkr250bs2m3dvpy9vsri8rkzj9z"; }; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ cppo ]; propagatedBuildInputs = [ lwt react ]; - createFindlibDestdir = true; - meta = { description = "Helpers for using React with Lwt"; inherit (lwt.meta) homepage license maintainers; - inherit (ocaml.meta) platforms; }; } diff --git a/pkgs/development/ocaml-modules/mdx/default.nix b/pkgs/development/ocaml-modules/mdx/default.nix index e5132d64d4d52..cd9cb2370d39c 100644 --- a/pkgs/development/ocaml-modules/mdx/default.nix +++ b/pkgs/development/ocaml-modules/mdx/default.nix @@ -5,12 +5,12 @@ buildDunePackage rec { pname = "mdx"; - version = "1.11.1"; + version = "2.1.0"; useDune2 = true; src = fetchurl { url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz"; - sha256 = "sha256:1q6169gmynnbrvlnzlmx7lpd6hwv6vwxg5j8ibc88wgs5s0r0fb0"; + sha256 = "sha256-ol1zy8LODDYdcnv/jByE0pnqJ5ujQuMALq3v9y7td/o="; }; nativeBuildInputs = [ cppo ]; diff --git a/pkgs/development/ocaml-modules/mirage-nat/default.nix b/pkgs/development/ocaml-modules/mirage-nat/default.nix index b04c0bb4a7c9c..9d4bbc88c2c59 100644 --- a/pkgs/development/ocaml-modules/mirage-nat/default.nix +++ b/pkgs/development/ocaml-modules/mirage-nat/default.nix @@ -1,5 +1,5 @@ { lib, buildDunePackage, fetchurl -, ipaddr, cstruct, lwt, rresult, logs, lru +, ipaddr, cstruct, lwt, logs, lru , tcpip, ethernet, stdlib-shims , alcotest, mirage-clock-unix , ppxlib, ppx_deriving @@ -7,16 +7,16 @@ buildDunePackage rec { pname = "mirage-nat"; - version = "2.2.3"; + version = "2.2.5"; - minimumOCamlVersion = "4.06"; + minimumOCamlVersion = "4.08"; # due to cstruct useDune2 = true; src = fetchurl { url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; - sha256 = "0cy95j184hi8fm1h6z6x1brjfrmbq3zjy2mqz99m8ys9vwkb63ma"; + sha256 = "01xp0z4mywhawz7rxizi9ph342mqqwyfa5hqgvs8lhqzcym5d104"; }; buildInputs = [ @@ -27,7 +27,6 @@ buildDunePackage rec { ipaddr cstruct lwt - rresult logs lru tcpip diff --git a/pkgs/development/ocaml-modules/mlgmpidl/default.nix b/pkgs/development/ocaml-modules/mlgmpidl/default.nix index a0026e3a8ca85..4e27c8ff3bb71 100644 --- a/pkgs/development/ocaml-modules/mlgmpidl/default.nix +++ b/pkgs/development/ocaml-modules/mlgmpidl/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, perl, ocaml, findlib, camlidl, gmp, mpfr }: stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-mlgmpidl-${version}"; + pname = "ocaml${ocaml.version}-mlgmpidl"; version = "1.2.12"; src = fetchFromGitHub { owner = "nberth"; diff --git a/pkgs/development/ocaml-modules/mtime/default.nix b/pkgs/development/ocaml-modules/mtime/default.nix index 9fa302947e922..3e4438f6da58c 100644 --- a/pkgs/development/ocaml-modules/mtime/default.nix +++ b/pkgs/development/ocaml-modules/mtime/default.nix @@ -16,7 +16,8 @@ let param = in stdenv.mkDerivation { - name = "ocaml${ocaml.version}-mtime-${param.version}"; + pname = "ocaml${ocaml.version}-mtime"; + inherit (param) version; src = fetchurl { url = "https://erratique.ch/software/mtime/releases/mtime-${param.version}.tbz"; diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix index 055e6db3a6452..fdd24094c17b6 100644 --- a/pkgs/development/ocaml-modules/nocrypto/default.nix +++ b/pkgs/development/ocaml-modules/nocrypto/default.nix @@ -20,7 +20,7 @@ then throw "nocrypto is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-nocrypto-${version}"; + pname = "ocaml${ocaml.version}-nocrypto"; version = "0.5.4"; src = fetchurl { diff --git a/pkgs/development/ocaml-modules/notty/default.nix b/pkgs/development/ocaml-modules/notty/default.nix index 8e1c5f38cb5d3..94342bb31282f 100644 --- a/pkgs/development/ocaml-modules/notty/default.nix +++ b/pkgs/development/ocaml-modules/notty/default.nix @@ -12,7 +12,7 @@ let withLwt = lwt != null; in stdenv.mkDerivation rec { version = "0.2.2"; - name = "ocaml${ocaml.version}-notty-${version}"; + pname = "ocaml${ocaml.version}-notty"; src = fetchurl { url = "https://github.com/pqwy/notty/releases/download/v${version}/notty-${version}.tbz"; diff --git a/pkgs/development/ocaml-modules/num/default.nix b/pkgs/development/ocaml-modules/num/default.nix index e2c7b439c69e9..b1293a2ab553e 100644 --- a/pkgs/development/ocaml-modules/num/default.nix +++ b/pkgs/development/ocaml-modules/num/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { version = "1.1"; - name = "ocaml${ocaml.version}-num-${version}"; + pname = "ocaml${ocaml.version}-num"; src = fetchFromGitHub { owner = "ocaml"; repo = "num"; diff --git a/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix b/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix index 63056481199f8..581890178eae8 100644 --- a/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix @@ -17,11 +17,12 @@ stdenv.mkDerivation rec { buildInputs = [ ocaml ]; - createFindlibDestdir = true; - - buildPhase = "make all opt CPPFLAGS=-Wno-error"; - - installPhase = "make install-opt"; + buildFlags = [ "all" "opt" "CPPFLAGS=-Wno-error" ]; + installTargets = "install-opt"; + preInstall = '' + # Fix 'dllmllibvirt.so' install failure into non-existent directory. + mkdir -p $OCAMLFIND_DESTDIR/stublibs + ''; meta = with lib; { description = "OCaml bindings for libvirt"; diff --git a/pkgs/development/ocaml-modules/ocaml-version/default.nix b/pkgs/development/ocaml-modules/ocaml-version/default.nix index a8912c0f5d581..aeb9c9dc699ca 100644 --- a/pkgs/development/ocaml-modules/ocaml-version/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-version/default.nix @@ -2,11 +2,11 @@ buildDunePackage rec { pname = "ocaml-version"; - version = "3.1.0"; + version = "3.4.0"; src = fetchurl { url = "https://github.com/ocurrent/ocaml-version/releases/download/v${version}/ocaml-version-v${version}.tbz"; - sha256 = "sha256-rHuhagnY9yISdC85NpgPv667aYx7v2JRgq99ayw83l8="; + sha256 = "sha256-2MG+tejY67dxC19DTOZqPsi3UrHk1rqHxP4nRSvbiiU="; }; minimumOCamlVersion = "4.07"; diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix index 5c3ca95bb0d8c..d6e8f83968aad 100644 --- a/pkgs/development/ocaml-modules/ocamlnet/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix @@ -7,7 +7,7 @@ then throw "ocamlnet is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-ocamlnet-${version}"; + pname = "ocaml${ocaml.version}-ocamlnet"; version = "4.1.9"; src = fetchurl { diff --git a/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix b/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix index be217812834f8..7635f3a686cd4 100644 --- a/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix +++ b/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix @@ -5,7 +5,7 @@ then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-ocp-ocamlres-${version}"; + pname = "ocaml${ocaml.version}-ocp-ocamlres"; version = "0.4"; src = fetchFromGitHub { owner = "OCamlPro"; diff --git a/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/pkgs/development/ocaml-modules/ocsigen-server/default.nix index 96a66874c759d..67ec458a122d5 100644 --- a/pkgs/development/ocaml-modules/ocsigen-server/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-server/default.nix @@ -37,7 +37,7 @@ buildDunePackage rec { ocaml_pcre xml-light ]; - configureFlags = [ "--root $(out)" "--prefix /" ]; + configureFlags = [ "--root $(out)" "--prefix /" "--temproot ''" ]; dontAddPrefix = true; dontAddStaticConfigureFlags = true; @@ -47,6 +47,10 @@ buildDunePackage rec { make -C src confs ''; + postInstall = '' + make install.files + ''; + postFixup = '' rm -rf $out/var/run diff --git a/pkgs/development/ocaml-modules/odoc-parser/default.nix b/pkgs/development/ocaml-modules/odoc-parser/default.nix index a8e6bd2599c33..7a2b5abd974b4 100644 --- a/pkgs/development/ocaml-modules/odoc-parser/default.nix +++ b/pkgs/development/ocaml-modules/odoc-parser/default.nix @@ -1,14 +1,24 @@ -{ lib, fetchurl, buildDunePackage, astring, result }: +{ lib, fetchurl, buildDunePackage, astring, result , version ? "1.0.0" }: +let param = { + "1.0.0" = { + sha256 = "sha256-tqoI6nGp662bK+vE2h7aDXE882dObVfRBFnZNChueqE="; + }; + "0.9.0" = { + sha256 = "sha256-3w2tG605v03mvmZsS2O5c71y66O3W+n3JjFxIbXwvXk="; + }; +}."${version}"; in + +let v = version; in buildDunePackage rec { pname = "odoc-parser"; - version = "0.9.0"; + inherit version; minimumOCamlVersion = "4.02"; src = fetchurl { - url = "https://github.com/ocaml-doc/odoc-parser/releases/download/0.9.0/odoc-parser-0.9.0.tbz"; - sha256 = "0ydxy2sj2w9i4vvyjnxplgmp5gbkp5ilnv36pvk4vgrrmldss3fz"; + url = "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz"; + inherit (param) sha256; }; useDune2 = true; diff --git a/pkgs/development/ocaml-modules/paf/cohttp.nix b/pkgs/development/ocaml-modules/paf/cohttp.nix index 3ea55b8e71bbf..b1a6321032ccd 100644 --- a/pkgs/development/ocaml-modules/paf/cohttp.nix +++ b/pkgs/development/ocaml-modules/paf/cohttp.nix @@ -13,6 +13,7 @@ , tcpip , uri , lwt +, astring }: buildDunePackage { @@ -33,7 +34,7 @@ buildDunePackage { ipaddr ]; - doCheck = true; + doCheck = false; # tests fail checkInputs = [ alcotest-lwt fmt @@ -43,6 +44,7 @@ buildDunePackage { tcpip uri lwt + astring ]; meta = paf.meta // { diff --git a/pkgs/development/ocaml-modules/paf/default.nix b/pkgs/development/ocaml-modules/paf/default.nix index 30277de4e5121..05d0edcebd49c 100644 --- a/pkgs/development/ocaml-modules/paf/default.nix +++ b/pkgs/development/ocaml-modules/paf/default.nix @@ -25,11 +25,11 @@ buildDunePackage rec { pname = "paf"; - version = "0.0.6"; + version = "0.0.8"; src = fetchurl { url = "https://github.com/dinosaure/paf-le-chien/releases/download/${version}/paf-${version}.tbz"; - sha256 = "21adbe0f7f9c0242354fa996468d01bf21d5cbcbdd978c911df8e2e299e8f9ae"; + sha256 = "CyIIV11G7oUPPHuhov52LP4Ih4pY6bcUApD23/9q39k="; }; useDune2 = true; @@ -46,15 +46,15 @@ buildDunePackage rec { faraday tls cstruct + tcpip ]; - doCheck = true; + doCheck = false; checkInputs = [ lwt logs fmt mirage-crypto-rng - tcpip mirage-time-unix ptime uri diff --git a/pkgs/development/ocaml-modules/parmap/default.nix b/pkgs/development/ocaml-modules/parmap/default.nix index d79999087dd83..521c1c406714b 100644 --- a/pkgs/development/ocaml-modules/parmap/default.nix +++ b/pkgs/development/ocaml-modules/parmap/default.nix @@ -2,11 +2,11 @@ buildDunePackage rec { pname = "parmap"; - version = "1.2.3"; + version = "1.2.4"; src = fetchurl { url = "https://github.com/rdicosmo/${pname}/releases/download/${version}/${pname}-${version}.tbz"; - sha256 = "1wg81slp453jci0gi0rzvdjx74110mlf1n5qpsmxic6fqsyz9d2v"; + sha256 = "sha256-BTkSEjIK3CVNloJACFo6eQ6Ob9o/cdrA9xuv87NKas4="; }; minimalOCamlVersion = "4.03"; diff --git a/pkgs/development/ocaml-modules/phylogenetics/default.nix b/pkgs/development/ocaml-modules/phylogenetics/default.nix index 1a23a4d3e131f..1cb348a41656e 100644 --- a/pkgs/development/ocaml-modules/phylogenetics/default.nix +++ b/pkgs/development/ocaml-modules/phylogenetics/default.nix @@ -11,7 +11,7 @@ , lacaml , menhir , menhirLib -, printbox +, printbox-text }: buildDunePackage rec { @@ -25,6 +25,11 @@ buildDunePackage rec { sha256 = "sha256:0knfh2s0jfnsc0vsq5yw5xla7m7i98xd0qv512dyh3jhkh7m00l9"; }; + # Ensure compatibility with printbox ≥ 0.6 + preConfigure = '' + substituteInPlace lib/dune --replace printbox printbox-text + ''; + minimalOCamlVersion = "4.08"; checkInputs = [ alcotest bppsuite ]; @@ -37,7 +42,7 @@ buildDunePackage rec { lacaml menhirLib ppx_deriving - printbox + printbox-text ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix index 7203f3702850c..590c001c41950 100644 --- a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix +++ b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix @@ -16,10 +16,14 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; - installPhase = "DESTDIR=$out make install"; + installPhase = '' + runHook preInstall + DESTDIR=$out make install + runHook postInstall + ''; meta = with lib; { - homepage = "http://piqi.org"; + homepage = "https://piqi.org"; description = "Universal schema language and a collection of tools built around it. These are the ocaml bindings"; license = licenses.asl20; maintainers = [ maintainers.maurer ]; diff --git a/pkgs/development/ocaml-modules/piqi/default.nix b/pkgs/development/ocaml-modules/piqi/default.nix index d7bc4b55b4527..faeb804d8aa88 100644 --- a/pkgs/development/ocaml-modules/piqi/default.nix +++ b/pkgs/development/ocaml-modules/piqi/default.nix @@ -19,18 +19,12 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; - buildPhase = '' - make - make -C piqilib piqilib.cma - ''; + postBuild = "make -C piqilib piqilib.cma"; - installPhase = '' - make install; - make ocaml-install; - ''; + installTargets = [ "install" "ocaml-install" ]; meta = with lib; { - homepage = "http://piqi.org"; + homepage = "https://piqi.org"; description = "Universal schema language and a collection of tools built around it"; license = licenses.asl20; maintainers = [ maintainers.maurer ]; diff --git a/pkgs/development/ocaml-modules/pprint/default.nix b/pkgs/development/ocaml-modules/pprint/default.nix index 0cdde114709c3..e0c5c269767b4 100644 --- a/pkgs/development/ocaml-modules/pprint/default.nix +++ b/pkgs/development/ocaml-modules/pprint/default.nix @@ -1,38 +1,22 @@ -{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild }: +{ lib, fetchFromGitHub, buildDunePackage }: -assert lib.versionAtLeast (lib.getVersion ocaml) "3.12"; +buildDunePackage rec { + pname = "pprint"; + version = "20220103"; -let param = - if lib.versionAtLeast ocaml.version "4.02" - then { - version = "20171003"; - sha256 = "06zwsskri8kaqjdszj9360nf36zvwh886xwf033aija8c9k4w6cx"; - } else { - version = "20140424"; - sha256 = "0sc9q89dnyarcg24czyhr6ams0ylqvia3745s6rfwd2nldpygsdk"; -}; in + useDune2 = true; -stdenv.mkDerivation { - - name = "ocaml${ocaml.version}-pprint-${param.version}"; - - src = fetchurl { - url = "http://gallium.inria.fr/~fpottier/pprint/pprint-${param.version}.tar.gz"; - inherit (param) sha256; + src = fetchFromGitHub { + owner = "fpottier"; + repo = pname; + rev = version; + sha256 = "sha256:09y6nwnjldifm47406q1r9987njlk77g4ifqg6qs54dckhr64vax"; }; - buildInputs = [ ocaml findlib ocamlbuild ]; - - createFindlibDestdir = true; - - dontBuild = true; - installFlags = [ "-C" "src" ]; - meta = with lib; { - homepage = "http://gallium.inria.fr/~fpottier/pprint/"; - description = "An OCaml adaptation of Wadler’s and Leijen’s prettier printer"; - license = licenses.cecill-c; + inherit (src.meta) homepage; + description = "An OCaml library for pretty-printing textual documents"; + license = licenses.lgpl2Only; maintainers = [ maintainers.vbgl ]; - platforms = ocaml.meta.platforms or []; }; } diff --git a/pkgs/development/ocaml-modules/ppx_import/default.nix b/pkgs/development/ocaml-modules/ppx_import/default.nix index 6588d6db7f45f..192e7258c4c53 100644 --- a/pkgs/development/ocaml-modules/ppx_import/default.nix +++ b/pkgs/development/ocaml-modules/ppx_import/default.nix @@ -1,27 +1,42 @@ -{ lib, fetchurl, buildDunePackage -, ppx_tools_versioned -, ocaml-migrate-parsetree +{ lib +, fetchurl +, buildDunePackage +, ounit +, ppx_deriving +, ppx_sexp_conv +, ppxlib }: +lib.throwIfNot (lib.versionAtLeast ppxlib.version "0.24.0") + "ppx_import is not available with ppxlib-${ppxlib.version}" + buildDunePackage rec { pname = "ppx_import"; - version = "1.8.0"; + version = "1.9.1"; useDune2 = true; - minimumOCamlVersion = "4.04"; + minimalOCamlVersion = "4.05"; src = fetchurl { - url = "https://github.com/ocaml-ppx/ppx_import/releases/download/v${version}/ppx_import-${version}.tbz"; - sha256 = "0zqcj70yyp4ik4jc6jz3qs2xhb94vxc6yq9ij0d5cyak28klc3gv"; + url = "https://github.com/ocaml-ppx/ppx_import/releases/download/${version}/ppx_import-${version}.tbz"; + sha256 = "1li1f9b1i0yhjy655k74hgzhd05palz726zjbhwcy3iqxvi9id6i"; }; propagatedBuildInputs = [ - ppx_tools_versioned ocaml-migrate-parsetree + ppxlib + ]; + + checkInputs = [ + ounit + ppx_deriving + ppx_sexp_conv ]; + doCheck = true; + meta = { - description = "A syntax extension that allows to pull in types or signatures from other compiled interface files"; + description = "A syntax extension for importing declarations from interface files"; license = lib.licenses.mit; homepage = "https://github.com/ocaml-ppx/ppx_import"; }; diff --git a/pkgs/development/ocaml-modules/ppxfind/default.nix b/pkgs/development/ocaml-modules/ppxfind/default.nix deleted file mode 100644 index 4e135c1b115ed..0000000000000 --- a/pkgs/development/ocaml-modules/ppxfind/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, lib, buildDunePackage, fetchurl, ocaml, ocaml-migrate-parsetree }: - -buildDunePackage (rec { - pname = "ppxfind"; - version = "1.4"; - src = fetchurl { - url = "https://github.com/diml/ppxfind/releases/download/${version}/ppxfind-${version}.tbz"; - sha256 = "0wa9vcrc26kirc2cqqs6kmarbi8gqy3dgdfiv9y7nzsgy1liqacq"; - }; - - minimumOCamlVersion = "4.03"; - useDune2 = true; - - buildInputs = [ ocaml-migrate-parsetree ]; - - # Don't run the native `strip' when cross-compiling. - dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; - - meta = { - homepage = "https://github.com/diml/ppxfind"; - description = "ocamlfind ppx tool"; - license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.vbgl ]; - }; -} // ( -if lib.versions.majorMinor ocaml.version == "4.04" then { - dontStrip = true; -} else {} -)) diff --git a/pkgs/development/ocaml-modules/ppxlib/default.nix b/pkgs/development/ocaml-modules/ppxlib/default.nix index faae96764bc5b..c5b2dd762cedb 100644 --- a/pkgs/development/ocaml-modules/ppxlib/default.nix +++ b/pkgs/development/ocaml-modules/ppxlib/default.nix @@ -2,7 +2,7 @@ , version ? if lib.versionAtLeast ocaml.version "4.07" then if lib.versionAtLeast ocaml.version "4.08" - then "0.23.0" else "0.15.0" else "0.13.0" + then "0.24.0" else "0.15.0" else "0.13.0" , ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio , stdlib-shims, ocaml-migrate-parsetree-2 }: @@ -42,6 +42,10 @@ let param = { sha256 = "0jg5v4pssbl66hn5davpin1i57a0r3r54l96vpz5y99xk5w70xi1"; min_version = "4.07"; }; + "0.24.0" = { + sha256 = "sha256-wuG7cUZiVP2PdM+nZloip7lGGiWn6Wpkh2YoF/Fuc9o="; + min_version = "4.07"; + }; }."${version}"; in if param ? max_version && lib.versionAtLeast ocaml.version param.max_version diff --git a/pkgs/development/ocaml-modules/printbox/default.nix b/pkgs/development/ocaml-modules/printbox/default.nix index 04361de722214..b42df087a9a64 100644 --- a/pkgs/development/ocaml-modules/printbox/default.nix +++ b/pkgs/development/ocaml-modules/printbox/default.nix @@ -1,21 +1,21 @@ -{ lib, fetchFromGitHub, buildDunePackage, ocaml, uucp, uutf, mdx }: +{ lib, fetchFromGitHub, buildDunePackage, ocaml, mdx }: buildDunePackage rec { pname = "printbox"; - version = "0.5"; + version = "0.6"; useDune2 = true; - minimumOCamlVersion = "4.03"; + minimalOCamlVersion = "4.03"; src = fetchFromGitHub { owner = "c-cube"; repo = pname; - rev = version; - sha256 = "099yxpp7d9bms6dwzp9im7dv1qb801hg5rx6awpx3rpfl4cvqfn2"; + rev = "v${version}"; + sha256 = "sha256:0vqp8j1vp8h8par699nnh31hnikzh6pqn07lqyxw65axqy3sc9dp"; }; - checkInputs = [ uucp uutf mdx.bin ]; + checkInputs = [ mdx.bin ]; # mdx is not available for OCaml < 4.07 doCheck = lib.versionAtLeast ocaml.version "4.07"; diff --git a/pkgs/development/ocaml-modules/printbox/text.nix b/pkgs/development/ocaml-modules/printbox/text.nix new file mode 100644 index 0000000000000..cc0aa5691de7f --- /dev/null +++ b/pkgs/development/ocaml-modules/printbox/text.nix @@ -0,0 +1,14 @@ +{ buildDunePackage, printbox, uucp, uutf, mdx }: + +buildDunePackage { + pname = "printbox-text"; + inherit (printbox) src version useDune2 doCheck; + + propagatedBuildInputs = [ printbox uucp uutf ]; + + checkInputs = [ mdx.bin ]; + + meta = printbox.meta // { + description = "Text renderer for printbox, using unicode edges"; + }; +} diff --git a/pkgs/development/ocaml-modules/process/default.nix b/pkgs/development/ocaml-modules/process/default.nix index aecf03987ab16..89faf40c3be57 100644 --- a/pkgs/development/ocaml-modules/process/default.nix +++ b/pkgs/development/ocaml-modules/process/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }: stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-process-${version}"; + pname = "ocaml${ocaml.version}-process"; version = "0.2.1"; src = fetchFromGitHub { diff --git a/pkgs/development/ocaml-modules/progress/default.nix b/pkgs/development/ocaml-modules/progress/default.nix index a3c0a5add3d21..4c00ff98465ab 100644 --- a/pkgs/development/ocaml-modules/progress/default.nix +++ b/pkgs/development/ocaml-modules/progress/default.nix @@ -1,23 +1,20 @@ -{ lib, buildDunePackage, fetchurl -, mtime, terminal_size, alcotest, astring, fmt +{ lib, buildDunePackage +, fmt, logs, mtime, optint, terminal, vector +, alcotest, astring }: buildDunePackage rec { pname = "progress"; - version = "0.1.1"; - minimumOCamlVersion = "4.08"; + minimalOCamlVersion = "4.08"; useDune2 = true; - src = fetchurl { - url = "https://github.com/CraigFe/progress/releases/download/${version}/progress-${version}.tbz"; - sha256 = "90c6bec19d014a4c6b0b67006f08bdfcf36981d2176769bebe0ccd75d6785a32"; - }; + inherit (terminal) version src; - propagatedBuildInputs = [ mtime terminal_size ]; + propagatedBuildInputs = [ fmt logs mtime optint terminal vector ]; doCheck = true; - checkInputs = [ alcotest astring fmt ]; + checkInputs = [ alcotest astring ]; meta = with lib; { description = "Progress bar library for OCaml"; diff --git a/pkgs/development/ocaml-modules/ptime/default.nix b/pkgs/development/ocaml-modules/ptime/default.nix index d99ec7ed32088..7015c6058b4fa 100644 --- a/pkgs/development/ocaml-modules/ptime/default.nix +++ b/pkgs/development/ocaml-modules/ptime/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { version = "0.8.5"; - name = "ocaml${ocaml.version}-ptime-${version}"; + pname = "ocaml${ocaml.version}-ptime"; src = fetchurl { url = "https://erratique.ch/software/ptime/releases/ptime-${version}.tbz"; diff --git a/pkgs/development/ocaml-modules/pycaml/default.nix b/pkgs/development/ocaml-modules/pycaml/default.nix index bee8a6106ea18..c19b40eb9afe7 100644 --- a/pkgs/development/ocaml-modules/pycaml/default.nix +++ b/pkgs/development/ocaml-modules/pycaml/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, ocaml, findlib, ncurses, python, ocaml_make }: +{ lib, stdenv, fetchurl, ocaml, findlib, ncurses, python2, ocaml_make }: # This is the original pycaml version with patches from debian. @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { sourceRoot = "pycaml"; patches = [ "../debian/patches/*.patch" ]; - buildInputs = [ ncurses ocaml findlib python ocaml_make ]; + buildInputs = [ ncurses ocaml findlib python2 ocaml_make ]; createFindlibDestdir = true; # the Makefile is not shipped with an install target, hence we do it ourselves. diff --git a/pkgs/development/ocaml-modules/repr/default.nix b/pkgs/development/ocaml-modules/repr/default.nix index 282d24d9b73bc..168da21a04eb8 100644 --- a/pkgs/development/ocaml-modules/repr/default.nix +++ b/pkgs/development/ocaml-modules/repr/default.nix @@ -1,12 +1,12 @@ -{ lib, buildDunePackage, fetchurl, base64, either, fmt, jsonm, uutf }: +{ lib, buildDunePackage, fetchurl, base64, either, fmt, jsonm, uutf, optint }: buildDunePackage rec { pname = "repr"; - version = "0.4.0"; + version = "0.5.0"; src = fetchurl { url = "https://github.com/mirage/${pname}/releases/download/${version}/${pname}-fuzz-${version}.tbz"; - sha256 = "1kpwgncyxcrq90dn7ilja7c5i88whc3fz4fmq1lwr0ar95d7d48p"; + sha256 = "1y9qnbaxcyxz7bzkkq5lwjrv715mvp2vphzcrd8vbvjhp7df3l1f"; }; minimumOCamlVersion = "4.08"; @@ -18,6 +18,7 @@ buildDunePackage rec { fmt jsonm uutf + optint ]; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/repr/ppx.nix b/pkgs/development/ocaml-modules/repr/ppx.nix index 561015254d751..b495f6bb77291 100644 --- a/pkgs/development/ocaml-modules/repr/ppx.nix +++ b/pkgs/development/ocaml-modules/repr/ppx.nix @@ -11,7 +11,7 @@ buildDunePackage { repr ]; - doCheck = true; + doCheck = false; # tests fail with ppxlib >= 0.23.0 checkInputs = [ alcotest hex diff --git a/pkgs/development/ocaml-modules/rope/default.nix b/pkgs/development/ocaml-modules/rope/default.nix index f29219e30c24b..9410ab21ea34f 100644 --- a/pkgs/development/ocaml-modules/rope/default.nix +++ b/pkgs/development/ocaml-modules/rope/default.nix @@ -23,7 +23,8 @@ let param = in stdenv.mkDerivation ({ - name = "ocaml${ocaml.version}-rope-${param.version}"; + pname = "ocaml${ocaml.version}-rope"; + inherit (param) version; src = fetchurl { inherit (param) url sha256; diff --git a/pkgs/development/ocaml-modules/rresult/default.nix b/pkgs/development/ocaml-modules/rresult/default.nix index 04631cc3b4bc2..1198ca957f013 100644 --- a/pkgs/development/ocaml-modules/rresult/default.nix +++ b/pkgs/development/ocaml-modules/rresult/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }: stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-rresult-${version}"; + pname = "ocaml${ocaml.version}-rresult"; version = "0.6.0"; src = fetchurl { url = "https://erratique.ch/software/rresult/releases/rresult-${version}.tbz"; diff --git a/pkgs/development/ocaml-modules/sosa/default.nix b/pkgs/development/ocaml-modules/sosa/default.nix index f244ad550bf1b..1605a15bea8ec 100644 --- a/pkgs/development/ocaml-modules/sosa/default.nix +++ b/pkgs/development/ocaml-modules/sosa/default.nix @@ -7,7 +7,7 @@ then throw "sosa is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-sosa-${version}"; + pname = "ocaml${ocaml.version}-sosa"; version = "0.3.0"; src = fetchFromGitHub { diff --git a/pkgs/development/ocaml-modules/stdcompat/default.nix b/pkgs/development/ocaml-modules/stdcompat/default.nix index df5c1a58b17ba..0f3b5377fc519 100644 --- a/pkgs/development/ocaml-modules/stdcompat/default.nix +++ b/pkgs/development/ocaml-modules/stdcompat/default.nix @@ -4,14 +4,16 @@ stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-stdcompat"; - version = "15"; + version = "18"; src = fetchurl { url = "https://github.com/thierry-martinez/stdcompat/releases/download/v${version}/stdcompat-${version}.tar.gz"; - sha256 = "1xcwb529m4lg9cbnxa9m3x2nnl9nxzz1x5lxpvdfflg4zxl6yx2y"; + sha256 = "sha256:01y67rndjlzfp5zq0gbqpg9skqq2hfbvhbq9lfhhk5xidr98sfj8"; }; buildInputs = [ ocaml findlib ]; + # build fails otherwise + enableParallelBuilding = false; configureFlags = "--libdir=$(OCAMLFIND_DESTDIR)"; diff --git a/pkgs/development/ocaml-modules/tcpip/default.nix b/pkgs/development/ocaml-modules/tcpip/default.nix index 635e9aea11716..ad12cb42d5e93 100644 --- a/pkgs/development/ocaml-modules/tcpip/default.nix +++ b/pkgs/development/ocaml-modules/tcpip/default.nix @@ -6,20 +6,20 @@ , lwt, lwt-dllist, logs, duration, randomconv, ethernet , alcotest, mirage-flow, mirage-vnetif, pcap-format , mirage-clock-unix, arp, ipaddr-cstruct, mirage-random-test -, lru +, lru, metrics , withFreestanding ? false , ocaml-freestanding }: buildDunePackage rec { pname = "tcpip"; - version = "6.2.0"; + version = "7.0.1"; useDune2 = true; src = fetchurl { - url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; - sha256 = "d0f6e643ce04da808d5f977c5ab2422cdb4f67e7abdc46dd6776ceada7151e1b"; + url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; + sha256 = "0gqj2s9sk3a7f4yavx423a569fvxsrgm0wg58biiv16v37xjaymp"; }; nativeBuildInputs = [ @@ -51,18 +51,19 @@ buildDunePackage rec { randomconv ethernet lru + metrics + arp ] ++ lib.optionals withFreestanding [ ocaml-freestanding ]; - doCheck = true; + doCheck = false; checkInputs = [ alcotest mirage-flow mirage-vnetif pcap-format mirage-clock-unix - arp ipaddr-cstruct ]; diff --git a/pkgs/development/ocaml-modules/terminal/default.nix b/pkgs/development/ocaml-modules/terminal/default.nix new file mode 100644 index 0000000000000..1fcdc1a5cba94 --- /dev/null +++ b/pkgs/development/ocaml-modules/terminal/default.nix @@ -0,0 +1,30 @@ +{ lib, buildDunePackage, fetchurl, ocaml +, stdlib-shims, uutf, uucp +, alcotest, fmt +}: + +buildDunePackage rec { + pname = "terminal"; + version = "0.2.1"; + + minimalOCamlVersion = "4.03"; + useDune2 = true; + + src = fetchurl { + url = "https://github.com/CraigFe/progress/releases/download/${version}/terminal-${version}.tbz"; + sha256 = "sha256:0vjqkvmpyi8kvmb4vrx3f0994rph8i9pvlrz1dyi126vlb2zbrvs"; + }; + + propagatedBuildInputs = [ stdlib-shims uutf uucp ]; + + doCheck = lib.versionAtLeast ocaml.version "4.05"; + checkInputs = [ alcotest fmt ]; + + meta = with lib; { + description = "Basic utilities for interacting with terminals"; + homepage = "https://github.com/CraigFe/progress"; + license = licenses.mit; + maintainers = [ maintainers.vbgl ]; + }; +} + diff --git a/pkgs/development/ocaml-modules/tezos/011-PtHangz2-test-helpers.nix b/pkgs/development/ocaml-modules/tezos/011-PtHangz2-test-helpers.nix new file mode 100644 index 0000000000000..589d6465b2066 --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/011-PtHangz2-test-helpers.nix @@ -0,0 +1,35 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-base +, tezos-client-011-PtHangz2 +, tezos-protocol-011-PtHangz2 +, tezos-protocol-011-PtHangz2-parameters +, tezos-protocol-environment +, tezos-shell-services +, tezos-stdlib-unix +, tezos-test-helpers +}: + +buildDunePackage { + pname = "tezos-011-PtHangz2-test-helpers"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src"; + + propagatedBuildInputs = [ + tezos-base + tezos-client-011-PtHangz2 + tezos-protocol-011-PtHangz2 + tezos-protocol-011-PtHangz2-parameters + tezos-protocol-environment + tezos-shell-services + tezos-stdlib-unix + tezos-test-helpers + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos/Protocol: protocol testing framework"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/base-test-helpers.nix b/pkgs/development/ocaml-modules/tezos/base-test-helpers.nix new file mode 100644 index 0000000000000..d9a8307bd3058 --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/base-test-helpers.nix @@ -0,0 +1,32 @@ +{ lib +, buildDunePackage +, alcotest +, alcotest-lwt +, tezos-base +, tezos-event-logging-test-helpers +, tezos-stdlib +, tezos-test-helpers +}: + +buildDunePackage { + pname = "tezos-base-test-helpers"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src/lib_base/test_helpers"; + + propagatedBuildInputs = [ + alcotest + alcotest-lwt + tezos-base + tezos-event-logging-test-helpers + ]; + + checkInputs = [ + tezos-test-helpers + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos: base test helpers"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/client-011-PtHangz2.nix b/pkgs/development/ocaml-modules/tezos/client-011-PtHangz2.nix new file mode 100644 index 0000000000000..ec564f70f3bde --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/client-011-PtHangz2.nix @@ -0,0 +1,44 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-mockup-registration +, tezos-proxy +, tezos-signer-backends +, tezos-protocol-011-PtHangz2-parameters +, tezos-protocol-plugin-011-PtHangz2 +, alcotest-lwt +, cacert +, ppx_inline_test +, qcheck-alcotest +, tezos-base-test-helpers +, tezos-test-helpers +}: + +buildDunePackage { + pname = "tezos-client-011-PtHangz2"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src"; + + propagatedBuildInputs = [ + tezos-mockup-registration + tezos-proxy + tezos-signer-backends + tezos-protocol-011-PtHangz2-parameters + tezos-protocol-plugin-011-PtHangz2 + ppx_inline_test + ]; + + checkInputs = [ + alcotest-lwt + cacert + qcheck-alcotest + tezos-base-test-helpers + tezos-test-helpers + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos/Protocol: protocol specific library for `tezos-client`"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/embedded-protocol-010-PtGRANAD.nix b/pkgs/development/ocaml-modules/tezos/embedded-protocol-010-PtGRANAD.nix index f0f9c2be77068..e2b9a8e8d79bc 100644 --- a/pkgs/development/ocaml-modules/tezos/embedded-protocol-010-PtGRANAD.nix +++ b/pkgs/development/ocaml-modules/tezos/embedded-protocol-010-PtGRANAD.nix @@ -3,25 +3,18 @@ , tezos-stdlib , tezos-protocol-010-PtGRANAD , tezos-protocol-updater -, tezos-protocol-compiler }: buildDunePackage { pname = "tezos-embedded-protocol-010-PtGRANAD"; inherit (tezos-stdlib) version useDune2; - src = "${tezos-stdlib.base_src}/src/proto_010_PtGRANAD/lib_protocol"; - - preBuild = tezos-protocol-010-PtGRANAD.preBuild; + src = "${tezos-stdlib.base_src}/src"; propagatedBuildInputs = [ tezos-protocol-010-PtGRANAD tezos-protocol-updater ]; - buildInputs = [ - tezos-protocol-compiler - ]; - doCheck = true; meta = tezos-stdlib.meta // { diff --git a/pkgs/development/ocaml-modules/tezos/embedded-protocol-demo-noops.nix b/pkgs/development/ocaml-modules/tezos/embedded-protocol-demo-noops.nix new file mode 100644 index 0000000000000..abe4aed67eb7a --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/embedded-protocol-demo-noops.nix @@ -0,0 +1,23 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-protocol-demo-noops +, tezos-protocol-updater +}: + +buildDunePackage { + pname = "tezos-embedded-protocol-demo-noops"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src"; + + propagatedBuildInputs = [ + tezos-protocol-demo-noops + tezos-protocol-updater + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos/Protocol: demo_noops (economic-protocol definition, embedded in `tezos-node`)"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/event-logging-test-helpers.nix b/pkgs/development/ocaml-modules/tezos/event-logging-test-helpers.nix new file mode 100644 index 0000000000000..0407277bde997 --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/event-logging-test-helpers.nix @@ -0,0 +1,25 @@ +{ lib +, buildDunePackage +, alcotest +, tezos-event-logging +, tezos-stdlib +, tezos-test-helpers +}: + +buildDunePackage { + pname = "tezos-event-logging-test-helpers"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src/lib_event_logging/test_helpers/"; + + propagatedBuildInputs = [ + alcotest + tezos-event-logging + tezos-test-helpers + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos: test helpers for the event logging library"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/lwt-result-stdlib.nix b/pkgs/development/ocaml-modules/tezos/lwt-result-stdlib.nix index 89c15b0f6345f..fd209741b3f6f 100644 --- a/pkgs/development/ocaml-modules/tezos/lwt-result-stdlib.nix +++ b/pkgs/development/ocaml-modules/tezos/lwt-result-stdlib.nix @@ -3,26 +3,22 @@ , ocaml , tezos-stdlib , lwt -, alcotest , alcotest-lwt , tezos-test-helpers }: -if lib.versionAtLeast ocaml.version "4.12" then - throw "tezos-lwt-result-stdlib-${tezos-stdlib.version} is not available for OCaml > 4.10" -else - buildDunePackage { pname = "tezos-lwt-result-stdlib"; inherit (tezos-stdlib) version useDune2; src = "${tezos-stdlib.base_src}/src/lib_lwt_result_stdlib"; + minimalOCamlVersion = "4.12"; + propagatedBuildInputs = [ lwt ]; checkInputs = [ - alcotest alcotest-lwt tezos-test-helpers ]; diff --git a/pkgs/development/ocaml-modules/tezos/p2p.nix b/pkgs/development/ocaml-modules/tezos/p2p.nix index cec1f1ef7b6e6..bdaabfda1b7d9 100644 --- a/pkgs/development/ocaml-modules/tezos/p2p.nix +++ b/pkgs/development/ocaml-modules/tezos/p2p.nix @@ -1,11 +1,14 @@ { lib , buildDunePackage -, tezos-stdlib -, tezos-p2p-services -, tezos-test-services , alcotest-lwt , astring +, lwt +, lwt-canceler , lwt-watcher +, ringo +, tezos-base-test-helpers +, tezos-p2p-services +, tezos-stdlib }: buildDunePackage { @@ -14,17 +17,20 @@ buildDunePackage { src = "${tezos-stdlib.base_src}/src/lib_p2p"; propagatedBuildInputs = [ - tezos-p2p-services + lwt + lwt-canceler lwt-watcher + ringo + tezos-p2p-services ]; checkInputs = [ - astring alcotest-lwt - tezos-test-services + astring + tezos-base-test-helpers ]; - doCheck = true; + doCheck = false; # some tests fail meta = tezos-stdlib.meta // { description = "Tezos: library for a pool of P2P connections"; diff --git a/pkgs/development/ocaml-modules/tezos/protocol-010-PtGRANAD.nix b/pkgs/development/ocaml-modules/tezos/protocol-010-PtGRANAD.nix index 80809cafbab22..2321245220f65 100644 --- a/pkgs/development/ocaml-modules/tezos/protocol-010-PtGRANAD.nix +++ b/pkgs/development/ocaml-modules/tezos/protocol-010-PtGRANAD.nix @@ -7,13 +7,7 @@ buildDunePackage { pname = "tezos-protocol-010-PtGRANAD"; inherit (tezos-stdlib) version useDune2; - src = "${tezos-stdlib.base_src}/src/proto_010_PtGRANAD/lib_protocol"; - - preBuild = '' - rm dune - cp -f ${tezos-protocol-compiler.src}/dune_protocol dune - sed -i.back -e s/-nostdlib//g dune.inc - ''; + src = "${tezos-stdlib.base_src}/src"; buildInputs = [ tezos-protocol-compiler diff --git a/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2-parameters.nix b/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2-parameters.nix new file mode 100644 index 0000000000000..26b05e56f85c1 --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2-parameters.nix @@ -0,0 +1,23 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-protocol-011-PtHangz2 +, tezos-protocol-environment +}: + +buildDunePackage { + pname = "tezos-protocol-011-PtHangz2-parameters"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src"; + + propagatedBuildInputs = [ + tezos-protocol-011-PtHangz2 + tezos-protocol-environment + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos/Protocol: parameters"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2.nix b/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2.nix new file mode 100644 index 0000000000000..2dec60851770a --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2.nix @@ -0,0 +1,21 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-protocol-compiler +}: + +buildDunePackage { + pname = "tezos-protocol-011-PtHangz2"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src"; + + buildInputs = [ + tezos-protocol-compiler + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos/Protocol: economic-protocol definition"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/protocol-alpha.nix b/pkgs/development/ocaml-modules/tezos/protocol-alpha.nix new file mode 100644 index 0000000000000..df31eeeefb8e2 --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/protocol-alpha.nix @@ -0,0 +1,21 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-protocol-compiler +}: + +buildDunePackage { + pname = "tezos-protocol-alpha"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src"; + + propagatedBuildInputs = [ + tezos-protocol-compiler + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos/Protocol: economic-protocol definition"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/protocol-compiler.nix b/pkgs/development/ocaml-modules/tezos/protocol-compiler.nix index 6178fb6c0811f..ac72c518e8275 100644 --- a/pkgs/development/ocaml-modules/tezos/protocol-compiler.nix +++ b/pkgs/development/ocaml-modules/tezos/protocol-compiler.nix @@ -2,14 +2,14 @@ , buildDunePackage , ocaml , tezos-stdlib +, tezos-version , tezos-protocol-environment , ocp-ocamlres -, re , pprint }: -if lib.versionAtLeast ocaml.version "4.12" then - throw "tezos-protocol-compiler-${tezos-stdlib.version} is not available for OCaml > 4.10" +if lib.versionAtLeast ocaml.version "4.13" then + throw "tezos-protocol-compiler-${tezos-stdlib.version} is not available for OCaml > 4.12" else buildDunePackage { @@ -17,12 +17,12 @@ buildDunePackage { inherit (tezos-stdlib) version useDune2; src = "${tezos-stdlib.base_src}/src/lib_protocol_compiler"; - minimalOCamlVersion = "4.10"; + minimalOCamlVersion = "4.12"; propagatedBuildInputs = [ + tezos-version tezos-protocol-environment ocp-ocamlres - re pprint ]; diff --git a/pkgs/development/ocaml-modules/tezos/protocol-demo-noops.nix b/pkgs/development/ocaml-modules/tezos/protocol-demo-noops.nix new file mode 100644 index 0000000000000..02958401ff8f7 --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/protocol-demo-noops.nix @@ -0,0 +1,21 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-protocol-compiler +}: + +buildDunePackage { + pname = "tezos-protocol-demo-noops"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src/"; + + propagatedBuildInputs = [ + tezos-protocol-compiler + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos/Protocol: demo_noops economic-protocol definition"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/protocol-environment-sigs.nix b/pkgs/development/ocaml-modules/tezos/protocol-environment-sigs.nix index 3008de6243198..dfd3fd14fe307 100644 --- a/pkgs/development/ocaml-modules/tezos/protocol-environment-sigs.nix +++ b/pkgs/development/ocaml-modules/tezos/protocol-environment-sigs.nix @@ -11,6 +11,8 @@ buildDunePackage { inherit (tezos-stdlib) version useDune2; src = "${tezos-stdlib.base_src}/src/lib_protocol_environment"; + minimalOCamlVersion = "4.12"; + postPatch = '' ls ./sigs/v0 cp -f ${zarith}/lib/ocaml/${ocaml.version}/site-lib/zarith/z.mli ./sigs/v1/z.mli diff --git a/pkgs/development/ocaml-modules/tezos/protocol-environment-structs.nix b/pkgs/development/ocaml-modules/tezos/protocol-environment-structs.nix index f7b61b22b2353..c55578b5605ca 100644 --- a/pkgs/development/ocaml-modules/tezos/protocol-environment-structs.nix +++ b/pkgs/development/ocaml-modules/tezos/protocol-environment-structs.nix @@ -3,6 +3,7 @@ , tezos-stdlib , tezos-crypto , tezos-protocol-environment-packer +, bls12-381-legacy }: buildDunePackage { @@ -13,6 +14,7 @@ buildDunePackage { propagatedBuildInputs = [ tezos-crypto tezos-protocol-environment-packer + bls12-381-legacy ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/tezos/protocol-environment.nix b/pkgs/development/ocaml-modules/tezos/protocol-environment.nix index 292e4ce41ee6b..f3e8bc42c54c0 100644 --- a/pkgs/development/ocaml-modules/tezos/protocol-environment.nix +++ b/pkgs/development/ocaml-modules/tezos/protocol-environment.nix @@ -1,6 +1,8 @@ { lib , ocaml , buildDunePackage +, bls12-381 +, bls12-381-legacy , tezos-stdlib , tezos-base , tezos-sapling @@ -18,6 +20,8 @@ buildDunePackage { src = "${tezos-stdlib.base_src}/src/lib_protocol_environment"; propagatedBuildInputs = [ + bls12-381 + bls12-381-legacy tezos-sapling tezos-base tezos-context diff --git a/pkgs/development/ocaml-modules/tezos/protocol-plugin-010-PtGRANAD.nix b/pkgs/development/ocaml-modules/tezos/protocol-plugin-010-PtGRANAD.nix index 2ce2315774261..8e80b3c65d312 100644 --- a/pkgs/development/ocaml-modules/tezos/protocol-plugin-010-PtGRANAD.nix +++ b/pkgs/development/ocaml-modules/tezos/protocol-plugin-010-PtGRANAD.nix @@ -1,9 +1,8 @@ { lib , buildDunePackage , tezos-stdlib -, tezos-embedded-protocol-010-PtGRANAD , tezos-protocol-010-PtGRANAD -, tezos-shell +, tezos-protocol-environment }: buildDunePackage { @@ -12,9 +11,8 @@ buildDunePackage { src = "${tezos-stdlib.base_src}/src/proto_010_PtGRANAD/lib_plugin"; buildInputs = [ - tezos-embedded-protocol-010-PtGRANAD tezos-protocol-010-PtGRANAD - tezos-shell + tezos-protocol-environment ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/tezos/protocol-plugin-011-PtHangz2.nix b/pkgs/development/ocaml-modules/tezos/protocol-plugin-011-PtHangz2.nix new file mode 100644 index 0000000000000..79333e0461788 --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/protocol-plugin-011-PtHangz2.nix @@ -0,0 +1,23 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-protocol-011-PtHangz2 +, tezos-protocol-environment +}: + +buildDunePackage { + pname = "tezos-protocol-plugin-011-PtHangz2"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src"; + + buildInputs = [ + tezos-protocol-011-PtHangz2 + tezos-protocol-environment + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos/Protocol: protocol plugin"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/protocol-plugin-alpha.nix b/pkgs/development/ocaml-modules/tezos/protocol-plugin-alpha.nix new file mode 100644 index 0000000000000..588a420a89015 --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/protocol-plugin-alpha.nix @@ -0,0 +1,21 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-protocol-alpha +}: + +buildDunePackage { + pname = "tezos-protocol-plugin-alpha"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src"; + + propagatedBuildInputs = [ + tezos-protocol-alpha + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos/Protocol: protocol plugin"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/proxy.nix b/pkgs/development/ocaml-modules/tezos/proxy.nix index 4e46027de0dbe..91ed6ab2340db 100644 --- a/pkgs/development/ocaml-modules/tezos/proxy.nix +++ b/pkgs/development/ocaml-modules/tezos/proxy.nix @@ -5,9 +5,9 @@ , tezos-context , ringo-lwt , alcotest-lwt -, crowbar -, tezos-test-services -, tezos-test-helpers +, qcheck-alcotest +, tezos-base-test-helpers +, tezos-shell-services-test-helpers }: buildDunePackage { @@ -23,9 +23,9 @@ buildDunePackage { checkInputs = [ alcotest-lwt - crowbar - tezos-test-services - tezos-test-helpers + qcheck-alcotest + tezos-base-test-helpers + tezos-shell-services-test-helpers ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/tezos/requester.nix b/pkgs/development/ocaml-modules/tezos/requester.nix index 2326f8ec91d52..35e426feb292c 100644 --- a/pkgs/development/ocaml-modules/tezos/requester.nix +++ b/pkgs/development/ocaml-modules/tezos/requester.nix @@ -2,9 +2,11 @@ , buildDunePackage , tezos-stdlib , tezos-base -, tezos-test-services , lwt-watcher , alcotest-lwt +, qcheck-alcotest +, tezos-base-test-helpers +, tezos-test-helpers }: buildDunePackage { @@ -19,7 +21,9 @@ buildDunePackage { checkInputs = [ alcotest-lwt - tezos-test-services + qcheck-alcotest + tezos-base-test-helpers + tezos-test-helpers ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/tezos/sapling.nix b/pkgs/development/ocaml-modules/tezos/sapling.nix index a51973ed7241c..59e61d49af0cf 100644 --- a/pkgs/development/ocaml-modules/tezos/sapling.nix +++ b/pkgs/development/ocaml-modules/tezos/sapling.nix @@ -4,7 +4,7 @@ , tezos-stdlib , tezos-crypto , tezos-rust-libs -, tezos-test-services +, tezos-base-test-helpers , alcotest-lwt }: @@ -20,7 +20,7 @@ buildDunePackage { checkInputs = [ alcotest-lwt - tezos-test-services + tezos-base-test-helpers ]; # requires the "zcash-params" files diff --git a/pkgs/development/ocaml-modules/tezos/shell-services-test-helpers.nix b/pkgs/development/ocaml-modules/tezos/shell-services-test-helpers.nix new file mode 100644 index 0000000000000..077e44852edd2 --- /dev/null +++ b/pkgs/development/ocaml-modules/tezos/shell-services-test-helpers.nix @@ -0,0 +1,32 @@ +{ lib +, buildDunePackage +, tezos-stdlib +, tezos-test-helpers +, tezos-base +, tezos-shell-services +, qcheck-core +, qcheck-alcotest +}: + +buildDunePackage { + pname = "tezos-shell-services-test-helpers"; + inherit (tezos-stdlib) version useDune2; + src = "${tezos-stdlib.base_src}/src/lib_shell_services/test_helpers/"; + + propagatedBuildInputs = [ + tezos-base + tezos-shell-services + tezos-test-helpers + qcheck-core + ]; + + checkInputs = [ + qcheck-alcotest + ]; + + doCheck = true; + + meta = tezos-stdlib.meta // { + description = "Tezos: shell_services test helpers"; + }; +} diff --git a/pkgs/development/ocaml-modules/tezos/shell-services.nix b/pkgs/development/ocaml-modules/tezos/shell-services.nix index d15993e0a919e..34354b1821f8e 100644 --- a/pkgs/development/ocaml-modules/tezos/shell-services.nix +++ b/pkgs/development/ocaml-modules/tezos/shell-services.nix @@ -4,6 +4,7 @@ , tezos-workers , tezos-p2p-services , tezos-version +, alcotest-lwt }: buildDunePackage { @@ -19,6 +20,10 @@ buildDunePackage { doCheck = true; + checkInputs = [ + alcotest-lwt + ]; + meta = tezos-stdlib.meta // { description = "Tezos: descriptions of RPCs exported by `tezos-shell`"; }; diff --git a/pkgs/development/ocaml-modules/tezos/shell.nix b/pkgs/development/ocaml-modules/tezos/shell.nix index 268db42fcdb9f..cdf5ea6639557 100644 --- a/pkgs/development/ocaml-modules/tezos/shell.nix +++ b/pkgs/development/ocaml-modules/tezos/shell.nix @@ -5,13 +5,13 @@ , tezos-requester , tezos-validation , tezos-store -, tezos-workers -, tezos-test-services -# , tezos-embedded-protocol-demo-noops -, tezos-test-helpers -# , tezos-protocol-plugin-alpha +, lwt-canceler , alcotest-lwt -, crowbar +, qcheck-alcotest +, tezos-base-test-helpers +, tezos-embedded-protocol-demo-noops +, tezos-protocol-plugin-alpha +, tezos-test-helpers }: buildDunePackage { @@ -20,24 +20,23 @@ buildDunePackage { src = "${tezos-stdlib.base_src}/src/lib_shell"; propagatedBuildInputs = [ + lwt-canceler tezos-p2p tezos-requester - tezos-validation tezos-store - tezos-workers + tezos-validation ]; checkInputs = [ alcotest-lwt - crowbar + qcheck-alcotest + tezos-base-test-helpers + tezos-embedded-protocol-demo-noops + tezos-protocol-plugin-alpha tezos-test-helpers - tezos-test-services - # tezos-embedded-protocol-demo-noops - # tezos-protocol-plugin-alpha ]; - # A lot of extra deps with wide dependency cones needed - doCheck = false; + doCheck = true; meta = tezos-stdlib.meta // { description = "Tezos: descriptions of RPCs exported by `tezos-shell`"; diff --git a/pkgs/development/ocaml-modules/tezos/stdlib.nix b/pkgs/development/ocaml-modules/tezos/stdlib.nix index 07ec63785bea5..31dfd43b6153c 100644 --- a/pkgs/development/ocaml-modules/tezos/stdlib.nix +++ b/pkgs/development/ocaml-modules/tezos/stdlib.nix @@ -16,17 +16,17 @@ buildDunePackage rec { pname = "tezos-stdlib"; - version = "10.2"; + version = "11.0"; base_src = fetchFromGitLab { owner = "tezos"; repo = "tezos"; rev = "v${version}"; - sha256 = "1sqwbdclsvzz0781r0830ncy1j048h12jp3hsdy7hz4dpqp80jsq"; + sha256 = "uUYd1DxH2bdCQlevQt3oGxvg0ai5EiCD2mti5SiueU8="; }; src = "${base_src}/src/lib_stdlib"; - minimalOCamlVersion = "4.10.0"; + minimalOCamlVersion = "4.08"; useDune2 = true; diff --git a/pkgs/development/ocaml-modules/tezos/test-helpers.nix b/pkgs/development/ocaml-modules/tezos/test-helpers.nix index 68a0d841ccf5d..6b3c42b85bac5 100644 --- a/pkgs/development/ocaml-modules/tezos/test-helpers.nix +++ b/pkgs/development/ocaml-modules/tezos/test-helpers.nix @@ -4,10 +4,7 @@ , qcheck-alcotest , alcotest , alcotest-lwt -, hashcons -, pyml , uri -, tezos-test-services , tezos-stdlib }: @@ -20,8 +17,6 @@ buildDunePackage rec { qcheck-alcotest alcotest alcotest-lwt - hashcons - pyml uri ]; diff --git a/pkgs/development/ocaml-modules/tezos/test-services.nix b/pkgs/development/ocaml-modules/tezos/test-services.nix deleted file mode 100644 index 0da38d896ead8..0000000000000 --- a/pkgs/development/ocaml-modules/tezos/test-services.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib -, fetchFromGitLab -, buildDunePackage -, tezos-stdlib -, tezos-base -, alcotest-lwt -}: - -buildDunePackage { - pname = "tezos-test-services"; - inherit (tezos-stdlib) version useDune2; - src = "${tezos-stdlib.base_src}/src/lib_test_services"; - - propagatedBuildInputs = [ - tezos-base - alcotest-lwt - ]; - - doCheck = true; - - meta = tezos-stdlib.meta // { - description = "Tezos: Alcotest-based test services"; - }; -} diff --git a/pkgs/development/ocaml-modules/topkg/default.nix b/pkgs/development/ocaml-modules/topkg/default.nix index 97052115da6bf..9e1369a8567b6 100644 --- a/pkgs/development/ocaml-modules/topkg/default.nix +++ b/pkgs/development/ocaml-modules/topkg/default.nix @@ -27,7 +27,7 @@ let in stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-topkg-${version}"; + pname = "ocaml${ocaml.version}-topkg"; inherit (param) version; src = fetchurl { diff --git a/pkgs/development/ocaml-modules/type_conv/109.60.01.nix b/pkgs/development/ocaml-modules/type_conv/109.60.01.nix index cc77a731f020c..4ec160a922308 100644 --- a/pkgs/development/ocaml-modules/type_conv/109.60.01.nix +++ b/pkgs/development/ocaml-modules/type_conv/109.60.01.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, ocaml, findlib, camlp4 }: +{ stdenv, lib, fetchFromGitHub, ocaml, findlib, camlp4 }: if !lib.versionAtLeast ocaml.version "4.00" || lib.versionAtLeast ocaml.version "4.03" @@ -8,9 +8,11 @@ stdenv.mkDerivation rec { pname = "ocaml-type_conv"; version = "109.60.01"; - src = fetchurl { - url = "https://github.com/janestreet/type_conv/archive/${version}.tar.gz"; - sha256 = "0lpxri68glgq1z2pp02rp45cb909xywbff8d4idljrf6fzzil2zx"; + src = fetchFromGitHub { + owner = "janestreet"; + repo = "type_conv"; + rev = version; + sha256 = "sha256-8Oz/fPL3+RghyxQp5u6seSEdf0BgfP6XNcsMYty0rNs="; }; buildInputs = [ ocaml findlib camlp4 ]; diff --git a/pkgs/development/ocaml-modules/type_conv/112.01.01.nix b/pkgs/development/ocaml-modules/type_conv/112.01.01.nix index c71bfa00e7efd..e90ca2d16a64d 100644 --- a/pkgs/development/ocaml-modules/type_conv/112.01.01.nix +++ b/pkgs/development/ocaml-modules/type_conv/112.01.01.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, buildOcaml}: +{ lib, fetchFromGitHub, buildOcaml}: buildOcaml rec { minimumSupportedOcamlVersion = "4.02"; @@ -6,9 +6,11 @@ buildOcaml rec { pname = "type_conv"; version = "113.00.02"; - src = fetchurl { - url = "https://github.com/janestreet/type_conv/archive/${version}.tar.gz"; - sha256 = "1718yl2q8zandrs4xqffkfmssfld1iz62dzcqdm925735c1x01fk"; + src = fetchFromGitHub { + owner = "janestreet"; + repo = "type_conv"; + rev = version; + sha256 = "sha256-HzH0hnceCQ2kDRATjl+tfKk3XSBDsGnPzVUGYpDQUmU="; }; meta = { diff --git a/pkgs/development/ocaml-modules/uunf/default.nix b/pkgs/development/ocaml-modules/uunf/default.nix index b71442a6a8b3d..073e6865fcdd0 100644 --- a/pkgs/development/ocaml-modules/uunf/default.nix +++ b/pkgs/development/ocaml-modules/uunf/default.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation { propagatedBuildInputs = [ uchar ]; + prePatch = lib.optionalString stdenv.isAarch64 "ulimit -s 16384"; + inherit (topkg) buildPhase installPhase; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/vector/default.nix b/pkgs/development/ocaml-modules/vector/default.nix new file mode 100644 index 0000000000000..c5f4336bb833a --- /dev/null +++ b/pkgs/development/ocaml-modules/vector/default.nix @@ -0,0 +1,23 @@ +{ lib, buildDunePackage, fetchurl }: + +buildDunePackage rec { + pname = "vector"; + version = "1.0.0"; + + useDune2 = true; + + src = fetchurl { + url = "https://github.com/backtracking/vector/releases/download/${version}/vector-${version}.tbz"; + sha256 = "sha256:0hb6prpada4c5z07sxf5ayj5xbahsnwall15vaqdwdyfjgbd24pj"; + }; + + doCheck = true; + + meta = { + description = "Resizable arrays for OCaml"; + license = lib.licenses.lgpl2Only; + homepage = "https://github.com/backtracking/vector"; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/wasm/default.nix b/pkgs/development/ocaml-modules/wasm/default.nix index 4befff2721b97..bf7fcb66fe5cf 100644 --- a/pkgs/development/ocaml-modules/wasm/default.nix +++ b/pkgs/development/ocaml-modules/wasm/default.nix @@ -5,7 +5,7 @@ then throw "wasm is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-wasm-${version}"; + pname = "ocaml${ocaml.version}-wasm"; version = "1.1.1"; src = fetchFromGitHub { diff --git a/pkgs/development/ocaml-modules/webbrowser/default.nix b/pkgs/development/ocaml-modules/webbrowser/default.nix index ebc5472ce53ba..6a21a1e1f751f 100644 --- a/pkgs/development/ocaml-modules/webbrowser/default.nix +++ b/pkgs/development/ocaml-modules/webbrowser/default.nix @@ -3,7 +3,7 @@ }: stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-webbrowser-${version}"; + pname = "ocaml${ocaml.version}-webbrowser"; version = "0.6.1"; src = fetchurl { url = "https://erratique.ch/software/webbrowser/releases/webbrowser-${version}.tbz"; diff --git a/pkgs/development/ocaml-modules/xml-light/default.nix b/pkgs/development/ocaml-modules/xml-light/default.nix index 248b3f1240741..683d2ec214f1c 100644 --- a/pkgs/development/ocaml-modules/xml-light/default.nix +++ b/pkgs/development/ocaml-modules/xml-light/default.nix @@ -1,10 +1,8 @@ { stdenv, lib, fetchFromGitHub, ocaml, findlib }: -let - pname = "xml-light"; + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-xml-light"; version = "2.4"; -in -stdenv.mkDerivation { - name = "ocaml-${pname}-${version}"; src = fetchFromGitHub { owner = "ncannasse"; @@ -17,15 +15,12 @@ stdenv.mkDerivation { createFindlibDestdir = true; - buildPhase = '' - make all - make opt - ''; - installPhase = '' + runHook preInstall make install_ocamlfind mkdir -p $out/share cp -vai doc $out/share/ + runHook postInstall ''; meta = { @@ -40,6 +35,6 @@ stdenv.mkDerivation { homepage = "http://tech.motion-twin.com/xmllight.html"; license = lib.licenses.lgpl21; maintainers = [ lib.maintainers.romildo ]; - platforms = ocaml.meta.platforms or [ ]; + inherit (ocaml.meta) platforms; }; } diff --git a/pkgs/development/ocaml-modules/z3/default.nix b/pkgs/development/ocaml-modules/z3/default.nix index 01b384fe0ba50..43fc5b245c8d8 100644 --- a/pkgs/development/ocaml-modules/z3/default.nix +++ b/pkgs/development/ocaml-modules/z3/default.nix @@ -1,9 +1,18 @@ -{ stdenv, ocaml, findlib, zarith, z3 }: +{ stdenv, lib, ocaml, findlib, zarith, z3 }: -let z3-with-ocaml = z3.override { +if !lib.versionAtLeast ocaml.version "4.07" +then throw "z3 is not available for OCaml ${ocaml.version}" +else + +let z3-with-ocaml = (z3.override { ocamlBindings = true; inherit ocaml findlib zarith; -}; in +}).overrideAttrs (o: { + patches = (o.patches or []) ++ [ + # Fix build; see: https://github.com/Z3Prover/z3/issues/5776 + ./ocamlfind.patch + ]; +}); in stdenv.mkDerivation { diff --git a/pkgs/development/ocaml-modules/z3/ocamlfind.patch b/pkgs/development/ocaml-modules/z3/ocamlfind.patch new file mode 100644 index 0000000000000..d84907cf79385 --- /dev/null +++ b/pkgs/development/ocaml-modules/z3/ocamlfind.patch @@ -0,0 +1,13 @@ +diff --git a/scripts/mk_util.py b/scripts/mk_util.py +index 042e6af46..1e105b002 100644 +--- a/scripts/mk_util.py ++++ b/scripts/mk_util.py +@@ -1995,7 +1995,7 @@ class MLComponent(Component): + + LIBZ3 = LIBZ3 + ' ' + ' '.join(map(lambda x: '-cclib ' + x, LDFLAGS.split())) + +- stubs_install_path = '$$(%s printconf path)/stublibs' % OCAMLFIND ++ stubs_install_path = '$$(%s printconf destdir)/stublibs' % OCAMLFIND + if not STATIC_LIB: + loadpath = '-ccopt -L' + stubs_install_path + dllpath = '-dllpath ' + stubs_install_path |