about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/ocaml
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-26 18:06:19 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-26 18:21:18 +0000
commit7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch)
treeb68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/development/tools/ocaml
parentc5c7451dbef37b51f52792d6395a670ef5183d27 (diff)
parent891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff)
downloadnixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/development/tools/ocaml')
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/camlidl/default.nix4
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/camlp5/default.nix22
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/cppo/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/dune-release/default.nix11
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/dune/2.nix22
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/dune/default.nix20
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/findlib/default.nix8
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/oasis/default.nix4
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/obelisk/default.nix28
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/obuild/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/ocamlbuild/default.nix4
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/ocamlformat/default.nix10
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix20
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/ocamlify/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/ocamlmod/default.nix4
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/ocamlscript/default.nix4
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/ocp-build/default.nix4
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/ocsigen-i18n/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/omake/default.nix4
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/opaline/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/opam/1.2.2.nix2
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/opam/default.nix2
-rwxr-xr-xnixpkgs/pkgs/development/tools/ocaml/opam/opam.nix.pl2
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/utop/default.nix16
26 files changed, 131 insertions, 102 deletions
diff --git a/nixpkgs/pkgs/development/tools/ocaml/camlidl/default.nix b/nixpkgs/pkgs/development/tools/ocaml/camlidl/default.nix
index 309c44d6d463..a464996ff381 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/camlidl/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/camlidl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, writeText }:
+{ lib, stdenv, fetchurl, ocaml, writeText }:
 
 let
   pname = "camlidl";
@@ -46,6 +46,6 @@ stdenv.mkDerivation rec {
     description = "A stub code generator and COM binding for Objective Caml";
     homepage = webpage;
     license = "LGPL";
-    maintainers = [ stdenv.lib.maintainers.roconnor ];
+    maintainers = [ lib.maintainers.roconnor ];
   };
 }
diff --git a/nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix b/nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix
index 73228655cca0..fffa426ba4c9 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchzip, which, ocaml, ocamlbuild }:
+{ lib, stdenv, fetchzip, which, ocaml, ocamlbuild }:
 
-if stdenv.lib.versionAtLeast ocaml.version "4.09"
+if lib.versionAtLeast ocaml.version "4.09"
 then throw "camlp4 is not available for OCaml ${ocaml.version}"
 else
 
@@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
 
   dontStrip = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A software system for writing extensible parsers for programming languages";
     homepage = "https://github.com/ocaml/camlp4";
     platforms = ocaml.meta.platforms or [];
diff --git a/nixpkgs/pkgs/development/tools/ocaml/camlp5/default.nix b/nixpkgs/pkgs/development/tools/ocaml/camlp5/default.nix
index 5fb76a526016..fc79cafdc42a 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/camlp5/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/camlp5/default.nix
@@ -1,26 +1,32 @@
-{ stdenv, fetchzip, ocaml }:
+{ lib, stdenv, fetchzip, ocaml, perl }:
+
+if lib.versionOlder ocaml.version "4.02"
+then throw "camlp5 is not available for OCaml ${ocaml.version}"
+else
 
 stdenv.mkDerivation {
 
-  name = "camlp5-7.13";
+  name = "camlp5-7.14";
 
   src = fetchzip {
-    url = "https://github.com/camlp5/camlp5/archive/rel713.tar.gz";
-    sha256 = "1d9spy3f5ahixm8nxxk086kpslzva669a5scn49am0s7vx4i71kp";
+    url = "https://github.com/camlp5/camlp5/archive/rel714.tar.gz";
+    sha256 = "1dd68bisbpqn5lq2pslm582hxglcxnbkgfkwhdz67z4w9d5nvr7w";
   };
 
-  buildInputs = [ ocaml ];
+  buildInputs = [ ocaml perl ];
 
   prefixKey = "-prefix ";
 
-  preConfigure = "configureFlagsArray=(--strict" +
-                  " --libdir $out/lib/ocaml/${ocaml.version}/site-lib)";
+  preConfigure = ''
+    configureFlagsArray=(--strict --libdir $out/lib/ocaml/${ocaml.version}/site-lib)
+    patchShebangs ./config/find_stuffversion.pl
+  '';
 
   buildFlags = [ "world.opt" ];
 
   dontStrip = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Preprocessor-pretty-printer for OCaml";
     longDescription = ''
       Camlp5 is a preprocessor and pretty-printer for OCaml programs.
diff --git a/nixpkgs/pkgs/development/tools/ocaml/cppo/default.nix b/nixpkgs/pkgs/development/tools/ocaml/cppo/default.nix
index a0215fa81471..032f346bf9c3 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/cppo/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/cppo/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchurl, fetchFromGitHub, ocaml, findlib, ocamlbuild
+{ lib, stdenv, fetchurl, fetchFromGitHub, ocaml, findlib, ocamlbuild
 , buildDunePackage
 }:
 
 let
   pname = "cppo";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "The C preprocessor for OCaml";
     longDescription = ''
       Cppo is an equivalent of the C preprocessor targeted at the OCaml language and its variants.
@@ -17,7 +17,7 @@ let
 
 in
 
-if stdenv.lib.versionAtLeast ocaml.version "4.02" then
+if lib.versionAtLeast ocaml.version "4.02" then
 
 buildDunePackage rec {
   inherit pname;
diff --git a/nixpkgs/pkgs/development/tools/ocaml/dune-release/default.nix b/nixpkgs/pkgs/development/tools/ocaml/dune-release/default.nix
index c267b2757a43..60a9bfba58fe 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/dune-release/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/dune-release/default.nix
@@ -32,9 +32,14 @@ in buildDunePackage rec {
     # to have a fixed path to the binary in nix store
     sed -i '/must_exist (Cmd\.v "curl"/d' lib/github.ml
 
-    # set bogus user info in git so git commit doesn't fail
-    sed -i '/git init/ a \    $ git config user.name test; git config user.email "pseudo@pseudo.invalid"' \
-      tests/bin/{delegate_info,errors,tag,no_doc,x-commit-hash}/run.t
+    # fix problems with git invocations in tests
+    for f in tests/bin/{delegate_info,errors,tag,no_doc,x-commit-hash}/run.t; do
+      # set bogus user info in git so git commit doesn't fail
+      sed -i '/git init/ a \    $ git config user.name test; git config user.email "pseudo@pseudo.invalid"' "$f"
+      # surpress hint to set default branch name
+      substituteInPlace "$f" --replace "git init" "git init -b main"
+    done
+
     # ignore weird yes error message
     sed -i 's/yes |/yes 2>\/dev\/null |/' tests/bin/no_doc/run.t
   '';
diff --git a/nixpkgs/pkgs/development/tools/ocaml/dune/2.nix b/nixpkgs/pkgs/development/tools/ocaml/dune/2.nix
index 177fa96f5b96..f2fe3693ed7a 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/dune/2.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/dune/2.nix
@@ -1,30 +1,22 @@
-{ stdenv, fetchurl, ocaml, findlib, fetchpatch }:
+{ lib, stdenv, fetchurl, ocaml, findlib }:
 
-if stdenv.lib.versionOlder ocaml.version "4.08"
+if lib.versionOlder ocaml.version "4.08"
 then throw "dune is not available for OCaml ${ocaml.version}"
 else
 
 stdenv.mkDerivation rec {
   pname = "dune";
-  version = "2.7.1";
+  version = "2.8.2";
 
   src = fetchurl {
     url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
-    sha256 = "0pcjf209gynjwipnpplaqyvyivnawqiwhvqnivhkybisicpqyln3";
+    sha256 = "07mf6pnmv1a6wh4la45zf6cn6qy2vcmz4xgx0djj75kw1wiyii72";
   };
 
   buildInputs = [ ocaml findlib ];
 
   buildFlags = "release";
 
-  patches = [
-    # Fix setup.ml configure path. Remove with the next release.
-    (fetchpatch {
-      url = "https://github.com/ocaml/dune/commit/8a3d7f2f2015b71384caa07226d1a89dba9d6c25.patch";
-      sha256 = "0dw4q10030h9xcdlxw2vp7qm0hd2qpkb98rir5d55m9vn65w8j28";
-    })
-  ];
-
   dontAddPrefix = true;
 
   installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
@@ -32,9 +24,9 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://dune.build/";
     description = "A composable build system";
-    changelog = "https://github.com/ocaml/dune/releases/tag/${version}";
-    maintainers = [ stdenv.lib.maintainers.vbgl stdenv.lib.maintainers.marsam ];
-    license = stdenv.lib.licenses.mit;
+    changelog = "https://github.com/ocaml/dune/blob/${version}/CHANGES.md";
+    maintainers = [ lib.maintainers.vbgl lib.maintainers.marsam ];
+    license = lib.licenses.mit;
     inherit (ocaml.meta) platforms;
   };
 }
diff --git a/nixpkgs/pkgs/development/tools/ocaml/dune/default.nix b/nixpkgs/pkgs/development/tools/ocaml/dune/default.nix
index ef0f5c4fabd4..bbdbc45270d0 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/dune/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/dune/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, ocaml, findlib, opaline }:
+{ stdenv, lib, fetchurl, ocaml, findlib }:
 
-if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+if !lib.versionAtLeast ocaml.version "4.02"
 then throw "dune is not available for OCaml ${ocaml.version}"
 else
 
@@ -15,20 +15,18 @@ stdenv.mkDerivation rec {
   buildInputs = [ ocaml findlib ];
 
   buildFlags = [ "release" ];
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "LIBDIR=$(OCAMLFIND_DESTDIR)"
+  ];
 
   dontAddPrefix = true;
 
-  installPhase = ''
-    runHook preInstall
-    ${opaline}/bin/opaline -prefix $out -libdir $OCAMLFIND_DESTDIR
-    runHook postInstall
-  '';
-
-  meta = {
+  meta = with lib; {
     homepage = "https://dune.build/";
     description = "A composable build system";
-    maintainers = [ stdenv.lib.maintainers.vbgl stdenv.lib.maintainers.marsam ];
-    license = stdenv.lib.licenses.mit;
+    maintainers = [ maintainers.vbgl maintainers.marsam ];
+    license = licenses.mit;
     inherit (ocaml.meta) platforms;
   };
 }
diff --git a/nixpkgs/pkgs/development/tools/ocaml/findlib/default.nix b/nixpkgs/pkgs/development/tools/ocaml/findlib/default.nix
index 1354e158a8e6..8752b2edb66e 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/findlib/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/findlib/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, m4, ncurses, ocaml, writeText }:
+{ lib, stdenv, fetchurl, fetchpatch, m4, ncurses, ocaml, writeText }:
 
 stdenv.mkDerivation rec {
   pname = "ocaml-findlib";
@@ -49,11 +49,11 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://projects.camlcity.org/projects/findlib.html";
     description = "O'Caml library manager";
-    license = stdenv.lib.licenses.mit;
+    license = lib.licenses.mit;
     platforms = ocaml.meta.platforms or [];
     maintainers = [
-      stdenv.lib.maintainers.maggesi
-      stdenv.lib.maintainers.vbmithr
+      lib.maintainers.maggesi
+      lib.maintainers.vbmithr
     ];
   };
 }
diff --git a/nixpkgs/pkgs/development/tools/ocaml/oasis/default.nix b/nixpkgs/pkgs/development/tools/ocaml/oasis/default.nix
index a0932d919c08..6854c7c20ca3 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/oasis/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/oasis/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, ocamlmod, ocamlify }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, ocamlmod, ocamlify }:
 
 stdenv.mkDerivation {
   version = "0.4.10";
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
   buildPhase     = "ocaml setup.ml -build";
   installPhase   = "ocaml setup.ml -install";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://oasis.forge.ocamlcore.org/";
     description = "Configure, build and install system for OCaml projects";
     license = licenses.lgpl21;
diff --git a/nixpkgs/pkgs/development/tools/ocaml/obelisk/default.nix b/nixpkgs/pkgs/development/tools/ocaml/obelisk/default.nix
index 483e9c45df01..d5e9d33d5db6 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/obelisk/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/obelisk/default.nix
@@ -1,20 +1,20 @@
 { lib, fetchurl, ocamlPackages }:
 
 ocamlPackages.buildDunePackage rec {
-	pname = "obelisk";
-	version = "0.5.2";
-	useDune2 = true;
-	src = fetchurl {
-		url = "https://github.com/Lelio-Brun/Obelisk/releases/download/v${version}/obelisk-v${version}.tbz";
-		sha256 = "0s86gkypyrkrp83xnay258ijri3yjwj3marsjnjf8mz58z0zd9g6";
-	};
+  pname = "obelisk";
+  version = "0.5.2";
+  useDune2 = true;
+  src = fetchurl {
+    url = "https://github.com/Lelio-Brun/Obelisk/releases/download/v${version}/obelisk-v${version}.tbz";
+    sha256 = "0s86gkypyrkrp83xnay258ijri3yjwj3marsjnjf8mz58z0zd9g6";
+  };
 
-	buildInputs = with ocamlPackages; [ menhir re ];
+  buildInputs = with ocamlPackages; [ menhir re ];
 
-	meta = {
-		description = "A simple tool which produces pretty-printed output from a Menhir parser file (.mly)";
-		license = lib.licenses.mit;
-		maintainers = [ lib.maintainers.vbgl ];
-		homepage = "https://github.com/Lelio-Brun/Obelisk";
-	};
+  meta = {
+    description = "A simple tool which produces pretty-printed output from a Menhir parser file (.mly)";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.vbgl ];
+    homepage = "https://github.com/Lelio-Brun/Obelisk";
+  };
 }
diff --git a/nixpkgs/pkgs/development/tools/ocaml/obuild/default.nix b/nixpkgs/pkgs/development/tools/ocaml/obuild/default.nix
index 5e851a93205b..e31334000da0 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/obuild/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/obuild/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, ocaml }:
+{ lib, stdenv, fetchzip, ocaml }:
 
 let version = "0.1.10"; in
 
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
     homepage = "https://github.com/ocaml-obuild/obuild";
     platforms = ocaml.meta.platforms or [];
     description = "Simple package build system for OCaml";
-    license = stdenv.lib.licenses.lgpl21;
-    maintainers = with stdenv.lib.maintainers; [ volth ];
+    license = lib.licenses.lgpl21;
+    maintainers = with lib.maintainers; [ volth ];
   };
 }
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocamlbuild/default.nix b/nixpkgs/pkgs/development/tools/ocaml/ocamlbuild/default.nix
index 7270386972de..c74794b35c95 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocamlbuild/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocamlbuild/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib }:
 let
   version = "0.14.0";
 in
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
     "OCAMLBUILD_LIBDIR=$OCAMLFIND_DESTDIR"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/ocaml/ocamlbuild/";
     description = "A build system with builtin rules to easily build most OCaml projects";
     license = licenses.lgpl2;
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/default.nix b/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/default.nix
index 1de95187af2f..57061cfe126c 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/default.nix
@@ -40,5 +40,13 @@ rec {
     version = "0.15.0";
   };
 
-  ocamlformat = ocamlformat_0_15_0;
+  ocamlformat_0_15_1 = mkOCamlformat {
+    version = "0.15.1";
+  };
+
+  ocamlformat_0_16_0 = mkOCamlformat {
+    version = "0.16.0";
+  };
+
+  ocamlformat = ocamlformat_0_16_0;
 }
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
index 8fac26c2b3e8..24527fcf41af 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
@@ -18,6 +18,8 @@ let src =
       "0.14.2" = "16phz1sg9b070p6fm8d42j0piizg05vghdjmw8aj7xm82b1pm7sz";
       "0.14.3" = "13pfakdncddm41cp61p0l98scawbvhx1q4zdsglv7ph87l7zwqfl";
       "0.15.0" = "0190vz59n6ma9ca1m3syl3mc8i1smj1m3d8x1jp21f710y4llfr6";
+      "0.15.1" = "1x6fha495sgk4z05g0p0q3zfqm5l6xzmf6vjm9g9g7c820ym2q9a";
+      "0.16.0" = "1vwjvvwha0ljc014v8jp8snki5zsqxlwd7x0dl0rg2i9kcmwc4mr";
     }."${version}";
   }
 ; in
@@ -39,7 +41,23 @@ buildDunePackage rec {
   useDune2 = true;
 
   buildInputs =
-    if lib.versionAtLeast version "0.14"
+    if lib.versionAtLeast version "0.15.1"
+    then [
+      base
+      cmdliner
+      fpath
+      odoc
+      re
+      stdio
+      uuseg
+      uutf
+      fix
+      menhir
+      (ppxlib.override { version = "0.18.0"; })
+      dune-build-info # lib.versionAtLeast version "0.16.0"
+      ocaml-version # lib.versionAtLeast version "0.16.0"
+    ]
+    else if lib.versionAtLeast version "0.14"
     then [
       base
       cmdliner
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocamlify/default.nix b/nixpkgs/pkgs/development/tools/ocaml/ocamlify/default.nix
index 9b06a55f07d0..a43903c34d38 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocamlify/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocamlify/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
 
 stdenv.mkDerivation {
   name = "ocamlify-0.0.2";
@@ -27,8 +27,8 @@ stdenv.mkDerivation {
     homepage = "https://forge.ocamlcore.org/projects/ocamlmod/ocamlmod";
     description = "Generate OCaml modules from source files";
     platforms = ocaml.meta.platforms or [];
-    license = stdenv.lib.licenses.lgpl21;
-    maintainers = with stdenv.lib.maintainers; [
+    license = lib.licenses.lgpl21;
+    maintainers = with lib.maintainers; [
       maggesi
     ];
   };
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocamlmod/default.nix b/nixpkgs/pkgs/development/tools/ocaml/ocamlmod/default.nix
index 49342d7b8485..77d390295512 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocamlmod/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocamlmod/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, ounit }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, ounit }:
 
 stdenv.mkDerivation {
   pname = "ocamlmod";
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
     homepage = "https://forge.ocamlcore.org/projects/ocamlmod/ocamlmod";
     description = "Generate OCaml modules from source files";
     platforms = ocaml.meta.platforms or [];
-    maintainers = with stdenv.lib.maintainers; [
+    maintainers = with lib.maintainers; [
       maggesi
     ];
   };
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocamlscript/default.nix b/nixpkgs/pkgs/development/tools/ocaml/ocamlscript/default.nix
index 2172c7f6161a..4518e7a22e41 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocamlscript/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocamlscript/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ocaml, findlib, camlp4}:
+{lib, stdenv, fetchurl, ocaml, findlib, camlp4}:
 stdenv.mkDerivation {
   name = "ocamlscript-2.0.3";
   src = fetchurl {
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
   preInstall = "mkdir $out/bin";
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://martin.jambon.free.fr/ocamlscript.html";
     license = licenses.boost;
     platforms = ocaml.meta.platforms or [];
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocp-build/default.nix b/nixpkgs/pkgs/development/tools/ocaml/ocp-build/default.nix
index 57db51612245..655f7b4d4c2f 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocp-build/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocp-build/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, ncurses, cmdliner, re }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ncurses, cmdliner, re }:
 let
   version = "1.99.21";
 in
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
   export configureFlags="$configureFlags --with-metadir=$OCAMLFIND_DESTDIR"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://www.typerex.org/ocp-build.html";
     description = "A build tool for OCaml";
     longDescription = ''
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocsigen-i18n/default.nix b/nixpkgs/pkgs/development/tools/ocaml/ocsigen-i18n/default.nix
index 476c98ce5bc6..b12aa2e6d6de 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocsigen-i18n/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocsigen-i18n/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, ocamlPackages }:
+{ lib, stdenv, fetchzip, ocamlPackages }:
 
 stdenv.mkDerivation rec
 {
@@ -22,8 +22,8 @@ stdenv.mkDerivation rec
   meta = {
     homepage = "https://github.com/besport/ocsigen-i18n";
     description = "I18n made easy for web sites written with eliom";
-    license = stdenv.lib.licenses.lgpl21;
-    maintainers = [ stdenv.lib.maintainers.gal_bolle ];
+    license = lib.licenses.lgpl21;
+    maintainers = [ lib.maintainers.gal_bolle ];
   };
 
 }
diff --git a/nixpkgs/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix b/nixpkgs/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix
index 6a3c0c20d85f..047246cd0a0d 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix
@@ -1,11 +1,11 @@
-{stdenv, fetchurl, makeWrapper, ocaml, ncurses}:
+{lib, stdenv, fetchurl, makeWrapper, ocaml, ncurses}:
 let
   pname = "omake";
   version = "0.9.8.6-0.rc1";
   webpage = "http://omake.metaprl.org";
 in
 
-if stdenv.lib.versionAtLeast ocaml.version "4.06"
+if lib.versionAtLeast ocaml.version "4.06"
 then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
 else
 
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
 #
 #  configureFlags = if transitional then "--transitional" else "--strict";
 #
-#  buildFlags = [ "world.opt" ];		
+#  buildFlags = [ "world.opt" ];
 
   meta = {
     description = "Omake build system";
diff --git a/nixpkgs/pkgs/development/tools/ocaml/omake/default.nix b/nixpkgs/pkgs/development/tools/ocaml/omake/default.nix
index 2afe0d1e9f52..bcfd86a2d4de 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/omake/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/omake/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, ncurses }:
+{ lib, stdenv, fetchurl, ocaml, ncurses }:
 
 stdenv.mkDerivation rec {
 
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A build system designed for scalability and portability";
     homepage = "http://projects.camlcity.org/projects/omake.html";
-    license = with stdenv.lib.licenses; [
+    license = with lib.licenses; [
       mit /* scripts */
       gpl2 /* program */
     ];
diff --git a/nixpkgs/pkgs/development/tools/ocaml/opaline/default.nix b/nixpkgs/pkgs/development/tools/ocaml/opaline/default.nix
index a49749ad716f..9cdacd289d49 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/opaline/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/opaline/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocamlPackages }:
+{ lib, stdenv, fetchFromGitHub, ocamlPackages }:
 
 stdenv.mkDerivation rec {
   version = "0.3.2";
@@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "OPAm Light INstaller Engine";
-    license = stdenv.lib.licenses.mit;
-    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.vbgl ];
     inherit (src.meta) homepage;
     inherit (ocamlPackages.ocaml.meta) platforms;
   };
diff --git a/nixpkgs/pkgs/development/tools/ocaml/opam/1.2.2.nix b/nixpkgs/pkgs/development/tools/ocaml/opam/1.2.2.nix
index e6c08b97aca4..a128f2144e9f 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/opam/1.2.2.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/opam/1.2.2.nix
@@ -82,7 +82,7 @@ in stdenv.mkDerivation {
 
   doCheck = false;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A package manager for OCaml";
     homepage = "http://opam.ocamlpro.com/";
     maintainers = [ maintainers.henrytill ];
diff --git a/nixpkgs/pkgs/development/tools/ocaml/opam/default.nix b/nixpkgs/pkgs/development/tools/ocaml/opam/default.nix
index 9e95db79dd0b..4fe408fb77f0 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/opam/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/opam/default.nix
@@ -110,7 +110,7 @@ in stdenv.mkDerivation {
 
   doCheck = false;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A package manager for OCaml";
     homepage = "https://opam.ocaml.org/";
     maintainers = [ maintainers.henrytill maintainers.marsam ];
diff --git a/nixpkgs/pkgs/development/tools/ocaml/opam/opam.nix.pl b/nixpkgs/pkgs/development/tools/ocaml/opam/opam.nix.pl
index 828e209fac61..1cbad6f5f44e 100755
--- a/nixpkgs/pkgs/development/tools/ocaml/opam/opam.nix.pl
+++ b/nixpkgs/pkgs/development/tools/ocaml/opam/opam.nix.pl
@@ -120,7 +120,7 @@ print <<'EOF';
 
   doCheck = false;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A package manager for OCaml";
     homepage = "https://opam.ocaml.org/";
     maintainers = [ maintainers.henrytill maintainers.marsam ];
diff --git a/nixpkgs/pkgs/development/tools/ocaml/utop/default.nix b/nixpkgs/pkgs/development/tools/ocaml/utop/default.nix
index ac7cd4f4dbbc..622ac80306f7 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/utop/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/utop/default.nix
@@ -1,18 +1,20 @@
-{ stdenv, fetchurl, ocaml, findlib, dune
+{ lib, stdenv, fetchurl, ocaml, findlib
 , lambdaTerm, cppo, makeWrapper, buildDunePackage
 }:
 
-if !stdenv.lib.versionAtLeast ocaml.version "4.03"
+if !lib.versionAtLeast ocaml.version "4.03"
 then throw "utop is not available for OCaml ${ocaml.version}"
 else
 
 buildDunePackage rec {
   pname = "utop";
-  version = "2.4.3";
+  version = "2.6.0";
+
+  useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/ocaml-community/utop/releases/download/${version}/utop-${version}.tbz";
-    sha256 = "107al0l3x4a5kkjka7glmhsqlm7pwzzc6shspiv5gsjb49pblc2f";
+    sha256 = "17n9igl74xcvj0mzdh2ybda29f2m48a5lj4yf8lrdqr7vg0982jd";
   };
 
   nativeBuildInputs = [ makeWrapper ];
@@ -56,7 +58,7 @@ buildDunePackage rec {
       --prefix CAML_LD_LIBRARY_PATH ":" "${get "CAML_LD_LIBRARY_PATH"}" \
       --prefix OCAMLPATH ":" "${get "OCAMLPATH"}" \
       --prefix OCAMLPATH ":" $(unset OCAMLPATH; addOCamlPath "$out"; printf %s "$OCAMLPATH") \
-      --add-flags "-I ${findlib}/lib/ocaml/${stdenv.lib.getVersion ocaml}/site-lib"
+      --add-flags "-I ${findlib}/lib/ocaml/${lib.getVersion ocaml}/site-lib"
    done
    '';
 
@@ -68,10 +70,10 @@ buildDunePackage rec {
     It integrates with the tuareg mode in Emacs.
     '';
     homepage = "https://github.com/diml/utop";
-    license = stdenv.lib.licenses.bsd3;
+    license = lib.licenses.bsd3;
     platforms = ocaml.meta.platforms or [];
     maintainers = [
-      stdenv.lib.maintainers.gal_bolle
+      lib.maintainers.gal_bolle
     ];
   };
 }