about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-01-11 08:54:33 +0100
committerProfpatsch <mail@profpatsch.de>2021-01-11 10:38:22 +0100
commit4a7f99d55d299453a9c2397f90b33d1120669775 (patch)
tree9fca8e9c9970d0a00ce56dfe11b63ae76b00cf01 /pkgs/development/ocaml-modules
parente87aef06e00c42b26789321454d7bd609548cc12 (diff)
downloadnixlib-4a7f99d55d299453a9c2397f90b33d1120669775.tar
nixlib-4a7f99d55d299453a9c2397f90b33d1120669775.tar.gz
nixlib-4a7f99d55d299453a9c2397f90b33d1120669775.tar.bz2
nixlib-4a7f99d55d299453a9c2397f90b33d1120669775.tar.lz
nixlib-4a7f99d55d299453a9c2397f90b33d1120669775.tar.xz
nixlib-4a7f99d55d299453a9c2397f90b33d1120669775.tar.zst
nixlib-4a7f99d55d299453a9c2397f90b33d1120669775.zip
treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/afl-persistent/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ansiterminal/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/atd/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/bap/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/bin_prot/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/biniou/1.0.nix4
-rw-r--r--pkgs/development/ocaml-modules/biocaml/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/bolt/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/camlimages/4.0.nix4
-rw-r--r--pkgs/development/ocaml-modules/camlpdf/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/camlzip/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/cfstream/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/cil/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/cmdliner/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/comparelib/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/cpdf/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/cpu/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/crowbar/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/cstruct/1.9.0.nix4
-rw-r--r--pkgs/development/ocaml-modules/csv/1.5.nix4
-rw-r--r--pkgs/development/ocaml-modules/ctypes/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/curses/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/dtoa/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/dum/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/easy-format/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/eigen/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/estring/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ezxmlm/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/faillib/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/fieldslib/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/fix/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/fmt/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/functory/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/gg/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/gsl/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/herelib/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/higlo/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/http/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/async-rpc-kernel.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/bin_prot.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/core_bench.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/fieldslib.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/js-build-tools.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-assert.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-bench.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-bin-prot.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-compare.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-custom-printf.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-enumerate.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-expect.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-fields-conv.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-here.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-inline-test.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-jane.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-let.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-optcomp.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-pipebang.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-sexp-conv.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-sexp-message.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-sexp-value.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-typerep-conv.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/sexplib.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/typerep.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/variantslib.nix4
-rw-r--r--pkgs/development/ocaml-modules/javalib/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/kafka/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/lablgl/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/lablgtk/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/lacaml/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/logs/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/macaque/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/menhir/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/menhir/generic.nix4
-rw-r--r--pkgs/development/ocaml-modules/ocaml-libvirt/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ocaml-syntax-shims/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ocf/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/odn/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/opti/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/otfm/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/pa_bench/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/pa_ounit/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/parany/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/pcre/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/phylogenetics/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/pipebang/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/piqi-ocaml/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/piqi/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/pprint/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ppx_gen_rec/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ppx_tools/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/react/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/reactivedata/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/sawja/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/secp256k1/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/sodium/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/sqlite3EZ/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/syslog/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/tsdl/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/twt/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/type_conv/108.08.00.nix4
-rw-r--r--pkgs/development/ocaml-modules/typerep/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/uucd/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/uucp/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/uuidm/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/uunf/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/uuseg/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/uutf/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/variantslib/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/wtf8/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/xmlm/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/xtmpl/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/yojson/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/zarith/default.nix4
114 files changed, 227 insertions, 227 deletions
diff --git a/pkgs/development/ocaml-modules/afl-persistent/default.nix b/pkgs/development/ocaml-modules/afl-persistent/default.nix
index 5ac352e0762c..5625cd95764f 100644
--- a/pkgs/development/ocaml-modules/afl-persistent/default.nix
+++ b/pkgs/development/ocaml-modules/afl-persistent/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, opaline }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, opaline }:
 
 stdenv.mkDerivation rec {
   pname = "afl-persistent";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
   doCheck = true;
   checkPhase = "./_build/test && ./_build/test2";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/stedolan/ocaml-afl-persistent";
     description = "persistent-mode afl-fuzz for ocaml";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/ansiterminal/default.nix b/pkgs/development/ocaml-modules/ansiterminal/default.nix
index 7b9f01751517..53b02a453a0e 100644
--- a/pkgs/development/ocaml-modules/ansiterminal/default.nix
+++ b/pkgs/development/ocaml-modules/ansiterminal/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
 
 stdenv.mkDerivation rec {
 
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/Chris00/ANSITerminal";
     description = "A module allowing to use the colors and cursor movements on ANSI terminals";
     longDescription = ''
diff --git a/pkgs/development/ocaml-modules/atd/default.nix b/pkgs/development/ocaml-modules/atd/default.nix
index 84b137ada7c3..41992575a996 100644
--- a/pkgs/development/ocaml-modules/atd/default.nix
+++ b/pkgs/development/ocaml-modules/atd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, menhir, easy-format, fetchFromGitHub, buildDunePackage, which, biniou, yojson }:
+{ lib, stdenv, menhir, easy-format, fetchFromGitHub, buildDunePackage, which, biniou, yojson }:
 
 buildDunePackage rec {
   pname = "atd";
@@ -18,7 +18,7 @@ buildDunePackage rec {
   buildInputs = [ which menhir ];
   propagatedBuildInputs = [ easy-format biniou yojson ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/mjambon/atd";
     description = "Syntax for cross-language type definitions";
     license = licenses.bsd3;
diff --git a/pkgs/development/ocaml-modules/bap/default.nix b/pkgs/development/ocaml-modules/bap/default.nix
index 9cb0859cedc8..f24896ba2e99 100644
--- a/pkgs/development/ocaml-modules/bap/default.nix
+++ b/pkgs/development/ocaml-modules/bap/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchurl
+{ lib, stdenv, fetchFromGitHub, fetchurl
 , ocaml, findlib, ocamlbuild, ocaml_oasis
 , bitstring, camlzip, cmdliner, core_kernel, ezjsonm, fileutils, ocaml_lwt, ocamlgraph, ocurl, re, uri, zarith, piqi, piqi-ocaml, uuidm, llvm, frontc, ounit, ppx_jane, parsexp
 , utop, libxml2, ncurses
@@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm}/bin/llvm-config" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Platform for binary analysis. It is written in OCaml, but can be used from other languages.";
     homepage = "https://github.com/BinaryAnalysisPlatform/bap/";
     maintainers = [ maintainers.maurer ];
diff --git a/pkgs/development/ocaml-modules/bin_prot/default.nix b/pkgs/development/ocaml-modules/bin_prot/default.nix
index 0dddb653e09e..1da1df752e89 100644
--- a/pkgs/development/ocaml-modules/bin_prot/default.nix
+++ b/pkgs/development/ocaml-modules/bin_prot/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildOcaml, fetchurl, ocaml, type_conv }:
+{ lib, stdenv, buildOcaml, fetchurl, ocaml, type_conv }:
 
 if stdenv.lib.versionAtLeast ocaml.version "4.06"
 then throw "bin_prot-112.24.00 is not available for OCaml ${ocaml.version}"
@@ -19,7 +19,7 @@ buildOcaml rec {
 
   hasSharedObjects = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/bin_prot";
     description = "Binary protocol generator ";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/biniou/1.0.nix b/pkgs/development/ocaml-modules/biniou/1.0.nix
index ed216d8236aa..e98c9a40eea6 100644
--- a/pkgs/development/ocaml-modules/biniou/1.0.nix
+++ b/pkgs/development/ocaml-modules/biniou/1.0.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ocaml, findlib, easy-format}:
+{lib, stdenv, fetchurl, ocaml, findlib, easy-format}:
 let
   pname = "biniou";
   version = "1.0.9";
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     mkdir $out/bin
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve";
     homepage = webpage;
     license = licenses.bsd3;
diff --git a/pkgs/development/ocaml-modules/biocaml/default.nix b/pkgs/development/ocaml-modules/biocaml/default.nix
index c85886c73de4..216978412e0a 100644
--- a/pkgs/development/ocaml-modules/biocaml/default.nix
+++ b/pkgs/development/ocaml-modules/biocaml/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildDunePackage, fetchFromGitHub, fetchpatch
+{ lib, stdenv, buildDunePackage, fetchFromGitHub, fetchpatch
 , ounit, async, base64, camlzip, cfstream
 , core, ppx_jane, ppx_sexp_conv, rresult, uri, xmlm }:
 
@@ -21,7 +21,7 @@ buildDunePackage rec {
   checkInputs = [ ounit ];
   propagatedBuildInputs = [ async base64 camlzip cfstream core rresult uri xmlm ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Bioinformatics library for Ocaml";
     homepage = "http://${pname}.org";
     maintainers = [ maintainers.bcdarwin ];
diff --git a/pkgs/development/ocaml-modules/bolt/default.nix b/pkgs/development/ocaml-modules/bolt/default.nix
index f5dc099b1403..d14deedcb657 100644
--- a/pkgs/development/ocaml-modules/bolt/default.nix
+++ b/pkgs/development/ocaml-modules/bolt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, which, camlp4 }:
+{ lib, stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, which, camlp4 }:
 
 let inherit (stdenv.lib) getVersion versionAtLeast; in
 
@@ -50,7 +50,7 @@ EOF
   doCheck = true;
   checkTarget = "tests";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://bolt.x9c.fr";
     description = "A logging tool for the OCaml language";
     longDescription = ''
diff --git a/pkgs/development/ocaml-modules/camlimages/4.0.nix b/pkgs/development/ocaml-modules/camlimages/4.0.nix
index e62acc3cd63f..26735b1c5d7f 100644
--- a/pkgs/development/ocaml-modules/camlimages/4.0.nix
+++ b/pkgs/development/ocaml-modules/camlimages/4.0.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, omake, ocaml, libtiff, libjpeg, libpng, giflib, findlib, libXpm, freetype, graphicsmagick, ghostscript }:
+{ lib, stdenv, fetchurl, omake, ocaml, libtiff, libjpeg, libpng, giflib, findlib, libXpm, freetype, graphicsmagick, ghostscript }:
 
 let
   pname = "camlimages";
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
     omake install
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     branch = "4.0";
     homepage = "https://bitbucket.org/camlspotter/camlimages";
     description = "OCaml image processing library";
diff --git a/pkgs/development/ocaml-modules/camlpdf/default.nix b/pkgs/development/ocaml-modules/camlpdf/default.nix
index 7e231001f24f..ca9432a72b3d 100644
--- a/pkgs/development/ocaml-modules/camlpdf/default.nix
+++ b/pkgs/development/ocaml-modules/camlpdf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, which, ocaml, findlib }:
+{ lib, stdenv, fetchFromGitHub, which, ocaml, findlib }:
 
 if !stdenv.lib.versionAtLeast ocaml.version "4.02"
 then throw "camlpdf is not available for OCaml ${ocaml.version}"
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
     mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An OCaml library for reading, writing and modifying PDF files";
     homepage = "https://github.com/johnwhitington/camlpdf";
     license = licenses.lgpl21Plus;
diff --git a/pkgs/development/ocaml-modules/camlzip/default.nix b/pkgs/development/ocaml-modules/camlzip/default.nix
index 1e6e0e8f8faa..d8bbfafa98de 100644
--- a/pkgs/development/ocaml-modules/camlzip/default.nix
+++ b/pkgs/development/ocaml-modules/camlzip/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, zlib, ocaml, findlib}:
+{lib, stdenv, fetchurl, zlib, ocaml, findlib}:
 
 let
   param =
@@ -53,7 +53,7 @@ stdenv.mkDerivation {
     ln -s $out/lib/ocaml/${ocaml.version}/site-lib/{,caml}zip
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://cristal.inria.fr/~xleroy/software.html#camlzip";
     description = "A library for handling ZIP and GZIP files in OCaml";
     longDescription = ''
diff --git a/pkgs/development/ocaml-modules/cfstream/default.nix b/pkgs/development/ocaml-modules/cfstream/default.nix
index d0fcf5be83cc..a947eadbf11d 100644
--- a/pkgs/development/ocaml-modules/cfstream/default.nix
+++ b/pkgs/development/ocaml-modules/cfstream/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildDunePackage, fetchFromGitHub, m4, core_kernel, ounit }:
+{ lib, stdenv, buildDunePackage, fetchFromGitHub, m4, core_kernel, ounit }:
 
 buildDunePackage rec {
   pname = "cfstream";
@@ -23,7 +23,7 @@ buildDunePackage rec {
 
   doCheck = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     inherit (src.meta) homepage;
     description = "Simple Core-inspired wrapper for standard library Stream module";
     maintainers = [ maintainers.bcdarwin ];
diff --git a/pkgs/development/ocaml-modules/cil/default.nix b/pkgs/development/ocaml-modules/cil/default.nix
index 9903c237e632..75e022449107 100644
--- a/pkgs/development/ocaml-modules/cil/default.nix
+++ b/pkgs/development/ocaml-modules/cil/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perl, ocaml, findlib, ocamlbuild }:
+{ lib, stdenv, fetchurl, perl, ocaml, findlib, ocamlbuild }:
 
 if stdenv.lib.versionAtLeast ocaml.version "4.06"
 then throw "cil is not available for OCaml ${ocaml.version}"
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
   '';
   prefixKey = "-prefix=";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://kerneis.github.io/cil/";
     description = "A front-end for the C programming language that facilitates program analysis and transformation";
     license = licenses.bsd3;
diff --git a/pkgs/development/ocaml-modules/cmdliner/default.nix b/pkgs/development/ocaml-modules/cmdliner/default.nix
index 7c94dcf54356..b99804710430 100644
--- a/pkgs/development/ocaml-modules/cmdliner/default.nix
+++ b/pkgs/development/ocaml-modules/cmdliner/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
 
 let
   pname = "cmdliner";
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://erratique.ch/software/cmdliner";
     description = "An OCaml module for the declarative definition of command line interfaces";
     license = licenses.bsd3;
diff --git a/pkgs/development/ocaml-modules/comparelib/default.nix b/pkgs/development/ocaml-modules/comparelib/default.nix
index 55787e123923..d5133064652d 100644
--- a/pkgs/development/ocaml-modules/comparelib/default.nix
+++ b/pkgs/development/ocaml-modules/comparelib/default.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcaml, fetchurl, type_conv}:
+{lib, stdenv, buildOcaml, fetchurl, type_conv}:
 
 buildOcaml rec {
   name = "comparelib";
@@ -13,7 +13,7 @@ buildOcaml rec {
 
   propagatedBuildInputs = [ type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/comparelib";
     description = "Syntax extension for deriving \"compare\" functions automatically";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/cpdf/default.nix b/pkgs/development/ocaml-modules/cpdf/default.nix
index e40f6531e1fd..cc2aad52d3d6 100644
--- a/pkgs/development/ocaml-modules/cpdf/default.nix
+++ b/pkgs/development/ocaml-modules/cpdf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, camlpdf, ncurses }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, camlpdf, ncurses }:
 
 let version = "2.3.1"; in
 
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
     cp cpdfmanual.pdf $out/share/doc/cpdf/
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://www.coherentpdf.com/";
     platforms = ocaml.meta.platforms or [];
     description = "PDF Command Line Tools";
diff --git a/pkgs/development/ocaml-modules/cpu/default.nix b/pkgs/development/ocaml-modules/cpu/default.nix
index 716e40e16e9f..2544723a902b 100644
--- a/pkgs/development/ocaml-modules/cpu/default.nix
+++ b/pkgs/development/ocaml-modules/cpu/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildDunePackage, fetchFromGitHub, autoconf }:
+{ lib, stdenv, buildDunePackage, fetchFromGitHub, autoconf }:
 
 buildDunePackage rec {
   pname = "cpu";
@@ -20,7 +20,7 @@ buildDunePackage rec {
 
   hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     inherit (src.meta) homepage;
     description = "Core pinning library";
     maintainers = [ maintainers.bcdarwin ];
diff --git a/pkgs/development/ocaml-modules/crowbar/default.nix b/pkgs/development/ocaml-modules/crowbar/default.nix
index 0189026e346b..d05d15286bf7 100644
--- a/pkgs/development/ocaml-modules/crowbar/default.nix
+++ b/pkgs/development/ocaml-modules/crowbar/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildDunePackage, fetchFromGitHub, ocplib-endian, cmdliner, afl-persistent
+{ lib, stdenv, buildDunePackage, fetchFromGitHub, ocplib-endian, cmdliner, afl-persistent
 , calendar, fpath, pprint, uutf, uunf, uucp }:
 
 buildDunePackage rec {
@@ -22,7 +22,7 @@ buildDunePackage rec {
   # uunf is broken on aarch64
   doCheck = !stdenv.isAarch64;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Property fuzzing for OCaml";
     homepage = "https://github.com/stedolan/crowbar";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/cstruct/1.9.0.nix b/pkgs/development/ocaml-modules/cstruct/1.9.0.nix
index 1cea58abee20..33c1aa6b7ae8 100644
--- a/pkgs/development/ocaml-modules/cstruct/1.9.0.nix
+++ b/pkgs/development/ocaml-modules/cstruct/1.9.0.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, ocamlbuild, ocplib-endian, sexplib, findlib, ppx_tools
+{ lib, stdenv, fetchFromGitHub, ocaml, ocamlbuild, ocplib-endian, sexplib, findlib, ppx_tools
 , async ? null, lwt ? null
 }:
 
@@ -26,7 +26,7 @@ stdenv.mkDerivation {
   createFindlibDestdir = true;
   dontStrip = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/mirage/ocaml-cstruct";
     description = "Map OCaml arrays onto C-like structs";
     license = stdenv.lib.licenses.isc;
diff --git a/pkgs/development/ocaml-modules/csv/1.5.nix b/pkgs/development/ocaml-modules/csv/1.5.nix
index 9b6152692631..6fdf20308611 100644
--- a/pkgs/development/ocaml-modules/csv/1.5.nix
+++ b/pkgs/development/ocaml-modules/csv/1.5.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
+{ lib, stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
 
 stdenv.mkDerivation {
 
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
 
   installPhase = "ocaml setup.ml -install";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A pure OCaml library to read and write CSV files";
     homepage = "https://github.com/Chris00/ocaml-csv";
     license = licenses.lgpl21;
diff --git a/pkgs/development/ocaml-modules/ctypes/default.nix b/pkgs/development/ocaml-modules/ctypes/default.nix
index 8a16dcec343b..1805f587cad6 100644
--- a/pkgs/development/ocaml-modules/ctypes/default.nix
+++ b/pkgs/development/ocaml-modules/ctypes/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, ocaml, findlib, libffi, pkgconfig, ncurses, integers }:
+{ lib, stdenv, fetchzip, ocaml, findlib, libffi, pkgconfig, ncurses, integers }:
 
 if !stdenv.lib.versionAtLeast ocaml.version "4.02"
 then throw "ctypes is not available for OCaml ${ocaml.version}"
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     make install XEN=false
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/ocamllabs/ocaml-ctypes";
     description = "Library for binding to C libraries using pure OCaml";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/curses/default.nix b/pkgs/development/ocaml-modules/curses/default.nix
index 2c989caa3e8d..f1211ad9cdc6 100644
--- a/pkgs/development/ocaml-modules/curses/default.nix
+++ b/pkgs/development/ocaml-modules/curses/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ncurses }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ncurses }:
 
 stdenv.mkDerivation rec {
   pname = "ocaml-curses";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
 
   buildPhase = "make all opt";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "OCaml Bindings to curses/ncurses";
     homepage = "https://opam.ocaml.org/packages/curses/curses.1.0.4/";
     license = licenses.gpl2;
diff --git a/pkgs/development/ocaml-modules/dtoa/default.nix b/pkgs/development/ocaml-modules/dtoa/default.nix
index b26cbec25edb..92f75fb3c334 100644
--- a/pkgs/development/ocaml-modules/dtoa/default.nix
+++ b/pkgs/development/ocaml-modules/dtoa/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, buildDunePackage }:
+{ lib, stdenv, fetchurl, buildDunePackage }:
 
 buildDunePackage rec {
   pname = "dtoa";
@@ -13,7 +13,7 @@ buildDunePackage rec {
 
   hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/flowtype/ocaml-dtoa";
     description = "Converts OCaml floats into strings (doubles to ascii, \"d to a\"), using the efficient Grisu3 algorithm.";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/dum/default.nix b/pkgs/development/ocaml-modules/dum/default.nix
index 844d06e30389..d8aa1f371f3b 100644
--- a/pkgs/development/ocaml-modules/dum/default.nix
+++ b/pkgs/development/ocaml-modules/dum/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib
 , easy-format
 }:
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
 
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/mjambon/dum";
     description = "Inspect the runtime representation of arbitrary OCaml values";
     license = licenses.lgpl21Plus;
diff --git a/pkgs/development/ocaml-modules/easy-format/default.nix b/pkgs/development/ocaml-modules/easy-format/default.nix
index 5c1155a723bd..6a3566fda2b6 100644
--- a/pkgs/development/ocaml-modules/easy-format/default.nix
+++ b/pkgs/development/ocaml-modules/easy-format/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, ocaml, findlib }:
+{ lib, stdenv, fetchzip, ocaml, findlib }:
 let
   pname = "easy-format";
   version = "1.2.0";
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
   doCheck = true;
   checkTarget = "test";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A high-level and functional interface to the Format module of the OCaml standard library";
     homepage = "https://github.com/ocaml-community/${pname}";
     license = licenses.bsd3;
diff --git a/pkgs/development/ocaml-modules/eigen/default.nix b/pkgs/development/ocaml-modules/eigen/default.nix
index dacd3a758623..e86d21da016a 100644
--- a/pkgs/development/ocaml-modules/eigen/default.nix
+++ b/pkgs/development/ocaml-modules/eigen/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildDunePackage, fetchFromGitHub, ctypes, libcxx }:
+{ lib, stdenv, buildDunePackage, fetchFromGitHub, ctypes, libcxx }:
 
 buildDunePackage rec {
   pname = "eigen";
@@ -19,7 +19,7 @@ buildDunePackage rec {
 
   propagatedBuildInputs = [ ctypes ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     inherit (src.meta) homepage;
     description = "Minimal/incomplete Ocaml interface to Eigen3, mostly for Owl";
     platforms = platforms.x86_64;
diff --git a/pkgs/development/ocaml-modules/estring/default.nix b/pkgs/development/ocaml-modules/estring/default.nix
index 4cd27f272b3c..782ebce9cb86 100644
--- a/pkgs/development/ocaml-modules/estring/default.nix
+++ b/pkgs/development/ocaml-modules/estring/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildOcaml, ocaml, fetchurl }:
+{ lib, stdenv, buildOcaml, ocaml, fetchurl }:
 
 if stdenv.lib.versionAtLeast ocaml.version "4.06"
 then throw "estring is not available for OCaml ${ocaml.version}"
@@ -13,7 +13,7 @@ buildOcaml rec {
     sha256 = "0b6znz5igm8pp28w4b7sgy82rpd9m5aw6ss933rfbw1mrh05gvcg";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://estring.forge.ocamlcore.org/";
     description = "Extension for string literals";
     license = licenses.bsd3;
diff --git a/pkgs/development/ocaml-modules/ezxmlm/default.nix b/pkgs/development/ocaml-modules/ezxmlm/default.nix
index 1740bd77fdb2..68b128283cc4 100644
--- a/pkgs/development/ocaml-modules/ezxmlm/default.nix
+++ b/pkgs/development/ocaml-modules/ezxmlm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, buildDunePackage, xmlm }:
+{ lib, stdenv, fetchFromGitHub, buildDunePackage, xmlm }:
 
 buildDunePackage rec {
   pname = "ezxmlm";
@@ -13,7 +13,7 @@ buildDunePackage rec {
 
   propagatedBuildInputs = [ xmlm ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Combinators to use with xmlm for parsing and selection";
     longDescription = ''
       An "easy" interface on top of the xmlm library. This version provides
diff --git a/pkgs/development/ocaml-modules/faillib/default.nix b/pkgs/development/ocaml-modules/faillib/default.nix
index 2a4d03e87aea..64993c4912d4 100644
--- a/pkgs/development/ocaml-modules/faillib/default.nix
+++ b/pkgs/development/ocaml-modules/faillib/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildOcaml, fetchurl, ocaml, herelib, camlp4 }:
+{ lib, stdenv, buildOcaml, fetchurl, ocaml, herelib, camlp4 }:
 
 if stdenv.lib.versionAtLeast ocaml.version "4.06"
 then throw "faillib-111.17.00 is not available for OCaml ${ocaml.version}"
@@ -19,7 +19,7 @@ buildOcaml rec {
   doCheck = true;
   checkPhase = "make test";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://ocaml.janestreet.com/";
     description = "Library for dealing with failure in OCaml";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/fieldslib/default.nix b/pkgs/development/ocaml-modules/fieldslib/default.nix
index 90b75faa54c2..9a90c7e5d0d2 100644
--- a/pkgs/development/ocaml-modules/fieldslib/default.nix
+++ b/pkgs/development/ocaml-modules/fieldslib/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, camlp4 }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, camlp4 }:
 
 assert stdenv.lib.versionOlder "4.00" (stdenv.lib.getVersion ocaml);
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
 
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://ocaml.janestreet.com/";
     description = "OCaml syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/fix/default.nix b/pkgs/development/ocaml-modules/fix/default.nix
index d1a2b93cee16..cdf585683d76 100644
--- a/pkgs/development/ocaml-modules/fix/default.nix
+++ b/pkgs/development/ocaml-modules/fix/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12";
 
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
 
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://gallium.inria.fr/~fpottier/fix/";
     description = "A simple OCaml module for computing the least solution of a system of monotone equations";
     license = licenses.cecill-c;
diff --git a/pkgs/development/ocaml-modules/fmt/default.nix b/pkgs/development/ocaml-modules/fmt/default.nix
index 6b457a9d6dc2..adac4c199c03 100644
--- a/pkgs/development/ocaml-modules/fmt/default.nix
+++ b/pkgs/development/ocaml-modules/fmt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, seq, stdlib-shims }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, seq, stdlib-shims }:
 
 if !stdenv.lib.versionAtLeast ocaml.version "4.05"
 then throw "fmt is not available for OCaml ${ocaml.version}"
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://erratique.ch/software/fmt";
     license = licenses.isc;
     description = "OCaml Format pretty-printer combinators";
diff --git a/pkgs/development/ocaml-modules/functory/default.nix b/pkgs/development/ocaml-modules/functory/default.nix
index 934a88254e27..e1078f420ba2 100644
--- a/pkgs/development/ocaml-modules/functory/default.nix
+++ b/pkgs/development/ocaml-modules/functory/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib }:
+{ lib, stdenv, fetchurl, ocaml, findlib }:
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11";
 
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
 
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://www.lri.fr/~filliatr/functory/";
     description = "A distributed computing library for Objective Caml which facilitates distributed execution of parallelizable computations in a seamless fashion";
     license = licenses.lgpl21;
diff --git a/pkgs/development/ocaml-modules/gg/default.nix b/pkgs/development/ocaml-modules/gg/default.nix
index d4c28be2f798..c772b9a8b547 100644
--- a/pkgs/development/ocaml-modules/gg/default.nix
+++ b/pkgs/development/ocaml-modules/gg/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline }:
 
 let
   inherit (stdenv.lib) getVersion versionAtLeast;
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
 
   installPhase = "opaline -libdir $OCAMLFIND_DESTDIR";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Basic types for computer graphics in OCaml";
     longDescription = ''
       Gg is an OCaml module providing basic types for computer graphics. It
diff --git a/pkgs/development/ocaml-modules/gsl/default.nix b/pkgs/development/ocaml-modules/gsl/default.nix
index aebdf4adb27f..4780b7917ce5 100644
--- a/pkgs/development/ocaml-modules/gsl/default.nix
+++ b/pkgs/development/ocaml-modules/gsl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, buildDunePackage, pkg-config, gsl, darwin, dune-configurator }:
+{ lib, stdenv, fetchurl, buildDunePackage, pkg-config, gsl, darwin, dune-configurator }:
 
 buildDunePackage rec {
   pname = "gsl";
@@ -14,7 +14,7 @@ buildDunePackage rec {
   buildInputs = [ dune-configurator gsl pkg-config ];
   propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Accelerate ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://mmottl.github.io/gsl-ocaml/";
     description = "OCaml bindings to the GNU Scientific Library";
     license = licenses.gpl3Plus;
diff --git a/pkgs/development/ocaml-modules/herelib/default.nix b/pkgs/development/ocaml-modules/herelib/default.nix
index a99b6cb711e4..16bf0443d7ed 100644
--- a/pkgs/development/ocaml-modules/herelib/default.nix
+++ b/pkgs/development/ocaml-modules/herelib/default.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcaml, fetchurl}:
+{lib, stdenv, buildOcaml, fetchurl}:
 
 buildOcaml rec {
   version = "112.35.00";
@@ -11,7 +11,7 @@ buildOcaml rec {
     sha256 = "03rrlpjmnd8d1rzzmd112355m7a5bwn3vf90xkbc6gkxlad9cxbs";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/herelib";
     description = "Syntax extension for inserting the current location";
     license = stdenv.lib.licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/higlo/default.nix b/pkgs/development/ocaml-modules/higlo/default.nix
index ecda6338beed..3c4b7a37f99e 100644
--- a/pkgs/development/ocaml-modules/higlo/default.nix
+++ b/pkgs/development/ocaml-modules/higlo/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, xtmpl, ulex }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, xtmpl, ulex }:
 
 stdenv.mkDerivation rec {
   pname = "higlo";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   patches = ./install.patch;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "OCaml library for syntax highlighting";
     homepage = "https://zoggy.github.io/higlo/";
     license = licenses.lgpl3;
diff --git a/pkgs/development/ocaml-modules/http/default.nix b/pkgs/development/ocaml-modules/http/default.nix
index 3936eb13c2fb..b1cae90a6184 100644
--- a/pkgs/development/ocaml-modules/http/default.nix
+++ b/pkgs/development/ocaml-modules/http/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ocaml_pcre, ocamlnet, ocaml, findlib, camlp4}:
+{lib, stdenv, fetchurl, ocaml_pcre, ocamlnet, ocaml, findlib, camlp4}:
 
 if stdenv.lib.versionAtLeast ocaml.version "4.06"
 then throw "ocaml-http is not available for OCaml ${ocaml.version}"
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
     make all opt
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://ocaml-http.forge.ocamlcore.org/";
     platforms = ocaml.meta.platforms or [];
     description = "Do it yourself (OCaml) HTTP daemon";
diff --git a/pkgs/development/ocaml-modules/janestreet/async-rpc-kernel.nix b/pkgs/development/ocaml-modules/janestreet/async-rpc-kernel.nix
index 70780ee385fa..513c0a17c01d 100644
--- a/pkgs/development/ocaml-modules/janestreet/async-rpc-kernel.nix
+++ b/pkgs/development/ocaml-modules/janestreet/async-rpc-kernel.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane, async_kernel, bin_prot, core_kernel,
+{lib, stdenv, buildOcamlJane, async_kernel, bin_prot, core_kernel,
  fieldslib, ppx_assert, ppx_bench, ppx_driver, ppx_expect, ppx_inline_test,
  ppx_jane, sexplib, typerep, variantslib}:
 
@@ -9,7 +9,7 @@ buildOcamlJane {
     ppx_assert ppx_bench ppx_driver ppx_expect ppx_inline_test ppx_jane
     sexplib typerep variantslib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/async_rpc_kernel";
     description = "Platform-independent core of Async RPC library";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/bin_prot.nix b/pkgs/development/ocaml-modules/janestreet/bin_prot.nix
index 1eb6b6a95f86..871fade158aa 100644
--- a/pkgs/development/ocaml-modules/janestreet/bin_prot.nix
+++ b/pkgs/development/ocaml-modules/janestreet/bin_prot.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane, type_conv}:
+{lib, stdenv, buildOcamlJane, type_conv}:
 
 buildOcamlJane {
   name = "bin_prot";
@@ -8,7 +8,7 @@ buildOcamlJane {
 
   propagatedBuildInputs = [ type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/bin_prot";
     description = "Binary protocol generator ";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/core_bench.nix b/pkgs/development/ocaml-modules/janestreet/core_bench.nix
index 1956a7f3b705..160fb30ee23e 100644
--- a/pkgs/development/ocaml-modules/janestreet/core_bench.nix
+++ b/pkgs/development/ocaml-modules/janestreet/core_bench.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , buildOcamlJane
 , core
 , core_extended
@@ -11,7 +11,7 @@ buildOcamlJane {
   propagatedBuildInputs =
     [ core core_extended textutils ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/core_bench";
     description = "Micro-benchmarking library for OCaml";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/fieldslib.nix b/pkgs/development/ocaml-modules/janestreet/fieldslib.nix
index 39aeb7047177..75b894a8c14f 100644
--- a/pkgs/development/ocaml-modules/janestreet/fieldslib.nix
+++ b/pkgs/development/ocaml-modules/janestreet/fieldslib.nix
@@ -1,4 +1,4 @@
-{ stdenv, type_conv, buildOcamlJane }:
+{ lib, stdenv, type_conv, buildOcamlJane }:
 
 buildOcamlJane {
   name = "fieldslib";
@@ -10,7 +10,7 @@ buildOcamlJane {
 
   propagatedBuildInputs = [ type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://ocaml.janestreet.com/";
     description = "OCaml syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix b/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix
index f77b793bcaab..eba4e8f94a7f 100644
--- a/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix
+++ b/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildOcaml, fetchurl, ocaml_oasis, opaline }:
+{ lib, stdenv, buildOcaml, fetchurl, ocaml_oasis, opaline }:
 
 buildOcaml rec {
   name = "js-build-tools";
@@ -21,7 +21,7 @@ buildOcaml rec {
 
   patches = [ ./js-build-tools-darwin.patch ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Jane Street Build Tools";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-assert.nix b/pkgs/development/ocaml-modules/janestreet/ppx-assert.nix
index 3ed7106e7b65..bd38d963034e 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-assert.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-assert.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_compare, ppx_core, ppx_driver, ppx_here, ppx_sexp_conv, ppx_tools, ppx_type_conv, sexplib}:
 
 buildOcamlJane {
@@ -8,7 +8,7 @@ buildOcamlJane {
     [ ppx_compare ppx_core ppx_driver ppx_here ppx_sexp_conv ppx_tools
       ppx_type_conv sexplib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Assert-like extension nodes that raise useful errors on failure";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-bench.nix b/pkgs/development/ocaml-modules/janestreet/ppx-bench.nix
index 9e5df431e04c..131af5367db6 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-bench.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-bench.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_driver, ppx_inline_test, ppx_tools}:
 
 buildOcamlJane {
@@ -10,7 +10,7 @@ buildOcamlJane {
 
   propagatedBuildInputs = [ ppx_core ppx_driver ppx_inline_test ppx_tools ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Syntax extension for writing in-line benchmarks in ocaml code";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-bin-prot.nix b/pkgs/development/ocaml-modules/janestreet/ppx-bin-prot.nix
index d7f333d4cf4c..c742d6fbe808 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-bin-prot.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-bin-prot.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_tools, ppx_type_conv, bin_prot}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "0kwmrrrybdkmphqczsr3lg3imsxcjb8iy41syvn44s3kcjfyyzbz";
   propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv bin_prot ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Generation of bin_prot readers and writers from types";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-compare.nix b/pkgs/development/ocaml-modules/janestreet/ppx-compare.nix
index 0bfdd7bd540c..51b18de65e6a 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-compare.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-compare.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_driver, ppx_tools, ppx_type_conv}:
 
 buildOcamlJane {
@@ -7,7 +7,7 @@ buildOcamlJane {
   propagatedBuildInputs =
     [ppx_core ppx_driver ppx_tools ppx_type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Generation of fast comparison functions from type expressions and definitions";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-custom-printf.nix b/pkgs/development/ocaml-modules/janestreet/ppx-custom-printf.nix
index c652afa5fbfc..f3a20425b73c 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-custom-printf.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-custom-printf.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_driver, ppx_sexp_conv, ppx_tools}:
 
 buildOcamlJane {
@@ -7,7 +7,7 @@ buildOcamlJane {
 
   propagatedBuildInputs = [ ppx_core ppx_driver ppx_sexp_conv ppx_tools ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Extensions to printf-style format-strings for user-defined string conversion";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-enumerate.nix b/pkgs/development/ocaml-modules/janestreet/ppx-enumerate.nix
index 2fdfede0f23d..d4c7c61a3992 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-enumerate.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-enumerate.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_tools, ppx_type_conv}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "0m11921q2pjzkwckf21fynd2qfy83n9jjsgks23yagdai8a7ym16";
   propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Generate a list containing all values of a finite type";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-expect.nix b/pkgs/development/ocaml-modules/janestreet/ppx-expect.nix
index f78f93ee1202..b3dfcb68ed19 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-expect.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-expect.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_assert, ppx_compare, ppx_core, ppx_custom_printf, ppx_driver,
  ppx_fields_conv, ppx_here, ppx_inline_test, ppx_sexp_conv, ppx_tools,
  ppx_variants_conv, re, sexplib, variantslib, fieldslib}:
@@ -11,7 +11,7 @@ buildOcamlJane {
       ppx_fields_conv ppx_here ppx_inline_test ppx_sexp_conv ppx_tools
       ppx_variants_conv re sexplib variantslib fieldslib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Cram-like framework for OCaml";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-fields-conv.nix b/pkgs/development/ocaml-modules/janestreet/ppx-fields-conv.nix
index 551738573b36..7fdcdc446128 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-fields-conv.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-fields-conv.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_tools, ppx_type_conv}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "11w9wfjgkv7yxv3rwlwi6m193zan6rhmi45q7n3ddi2s8ls3gra7";
   propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Generation of accessor and iteration functions for ocaml records";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-here.nix b/pkgs/development/ocaml-modules/janestreet/ppx-here.nix
index ea3ac5e8e5ae..95ebb59faf9f 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-here.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-here.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_driver}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "1mzdgn8k171zkwmbizf1a48l525ny0w3363c7gknpnifcinxniiw";
   propagatedBuildInputs = [ ppx_core ppx_driver ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A ppx rewriter that defines an extension node whose value is its source position";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-inline-test.nix b/pkgs/development/ocaml-modules/janestreet/ppx-inline-test.nix
index d0e4c84158c7..811e529851b8 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-inline-test.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-inline-test.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_driver, ppx_tools}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "0ygapa54i0wwcj3jcqwiimrc6z0b7aafgjhbk37h6vvclnm5n7f6";
   propagatedBuildInputs = [ ppx_core ppx_driver ppx_tools ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Syntax extension for writing in-line tests in ocaml code";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-jane.nix b/pkgs/development/ocaml-modules/janestreet/ppx-jane.nix
index 1086059b19f3..07577dbf1f7a 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-jane.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-jane.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_assert,
  ppx_bench, ppx_bin_prot, ppx_compare, ppx_custom_printf, ppx_driver,
  ppx_enumerate, ppx_expect, ppx_fail, ppx_fields_conv, ppx_here,
@@ -14,7 +14,7 @@ buildOcamlJane {
       ppx_here ppx_inline_test ppx_let ppx_pipebang ppx_sexp_conv
       ppx_sexp_message ppx_sexp_value ppx_typerep_conv ppx_variants_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A ppx_driver including all standard ppx rewriters";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-let.nix b/pkgs/development/ocaml-modules/janestreet/ppx-let.nix
index 8c8b87d7112e..370221c1d481 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-let.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-let.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_driver}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "0whnfq4rgkq4apfqnvc100wlk25pmqdyvy6s21dsn3fcm9hff467";
   propagatedBuildInputs = [ ppx_core ppx_driver ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A ppx rewriter for monadic and applicative let bindings and match statements";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-optcomp.nix b/pkgs/development/ocaml-modules/janestreet/ppx-optcomp.nix
index 61fa66b77cc5..fe4f1753fa78 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-optcomp.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-optcomp.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_tools}:
 
 buildOcamlJane {
@@ -7,7 +7,7 @@ buildOcamlJane {
   propagatedBuildInputs =
     [ ppx_core ppx_tools ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "ppx_optcomp stands for Optional Compilation. It is a tool used to handle optional compilations of pieces of code depending of the word size, the version of the compiler, etc.";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-pipebang.nix b/pkgs/development/ocaml-modules/janestreet/ppx-pipebang.nix
index 209638f97b74..b1d8007936b6 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-pipebang.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-pipebang.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_driver, ppx_tools}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "0k25bhj9ziiw89xvs4svz7cgazbbmprba9wbic2llffg55fp7acc";
   propagatedBuildInputs = [ ppx_core ppx_driver ppx_tools ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A ppx rewriter that inlines reverse application operators |> and |!";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-sexp-conv.nix b/pkgs/development/ocaml-modules/janestreet/ppx-sexp-conv.nix
index 00361ee81ebe..c820464d1096 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-sexp-conv.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-sexp-conv.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_tools, ppx_type_conv, sexplib}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "1kgbmlc11w5jhbhmy5n0f734l44zwyry48342dm5qydi9sfzcgq2";
   propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv sexplib];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "PPX syntax extension that generates code for converting OCaml types to and from s-expressions, as defined in the sexplib library";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-sexp-message.nix b/pkgs/development/ocaml-modules/janestreet/ppx-sexp-message.nix
index 2a8bf44bfab2..a710436000ec 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-sexp-message.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-sexp-message.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_driver, ppx_here, ppx_sexp_conv, ppx_tools}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "0inbff25qii868p141jb1y8n3vjfyz66jpnsl9nma6nkkyjkp05j";
   propagatedBuildInputs = [ ppx_core ppx_driver ppx_here ppx_sexp_conv ppx_tools ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Easy construction of S-Expressions";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-sexp-value.nix b/pkgs/development/ocaml-modules/janestreet/ppx-sexp-value.nix
index 64fbe4bd9bb9..e51a27ffaeef 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-sexp-value.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-sexp-value.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_driver, ppx_here, ppx_sexp_conv, ppx_tools}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "04602ppqfwx33ghjywam00hlqqzsz4d99r60k9q0v1mynk9pjhj0";
   propagatedBuildInputs = [ ppx_core ppx_driver ppx_here ppx_sexp_conv ppx_tools ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A ppx rewriter that simplifies building S-Expression from OCaml Values";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-typerep-conv.nix b/pkgs/development/ocaml-modules/janestreet/ppx-typerep-conv.nix
index 472ec19b5588..b4d6288a179c 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-typerep-conv.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-typerep-conv.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_tools, ppx_type_conv, typerep}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "0dldlx73r07j6w0i7h4hxly0v678naa79na5rafsk2974gs5ih9g";
   propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv typerep ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Automatic generation of runtime types from type definitions";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix b/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix
index 1d01b0bc321d..7989ecaecea7 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane,
+{lib, stdenv, buildOcamlJane,
  ppx_core, ppx_tools, ppx_type_conv, sexplib, variantslib}:
 
 buildOcamlJane {
@@ -6,7 +6,7 @@ buildOcamlJane {
   hash = "0kgal8b9yh7wrd75hllb9fyl6zbksfnr9k7pykpzdm3js98dirhn";
   propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv sexplib variantslib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Generation of accessor and iteration functions for ocaml variant types";
     maintainers = [ maintainers.maurer ];
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/sexplib.nix b/pkgs/development/ocaml-modules/janestreet/sexplib.nix
index 1bb9d489b148..df8f6591bdac 100644
--- a/pkgs/development/ocaml-modules/janestreet/sexplib.nix
+++ b/pkgs/development/ocaml-modules/janestreet/sexplib.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane, type_conv}:
+{lib, stdenv, buildOcamlJane, type_conv}:
 
 buildOcamlJane {
   minimumSupportedOcamlVersion = "4.02";
@@ -9,7 +9,7 @@ buildOcamlJane {
 
   propagatedBuildInputs = [ type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://ocaml.janestreet.com/";
     description = "Library for serializing OCaml values to and from S-expressions";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/typerep.nix b/pkgs/development/ocaml-modules/janestreet/typerep.nix
index 9ed037e52110..ee751eb3cfc4 100644
--- a/pkgs/development/ocaml-modules/janestreet/typerep.nix
+++ b/pkgs/development/ocaml-modules/janestreet/typerep.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane, type_conv}:
+{lib, stdenv, buildOcamlJane, type_conv}:
 
 buildOcamlJane {
   name = "typerep";
@@ -10,7 +10,7 @@ buildOcamlJane {
 
   propagatedBuildInputs = [ type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/typerep";
     description = "Runtime types for OCaml (beta version)";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/janestreet/variantslib.nix b/pkgs/development/ocaml-modules/janestreet/variantslib.nix
index 02e63291add2..3fd7877d2bb4 100644
--- a/pkgs/development/ocaml-modules/janestreet/variantslib.nix
+++ b/pkgs/development/ocaml-modules/janestreet/variantslib.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcamlJane, type_conv}:
+{lib, stdenv, buildOcamlJane, type_conv}:
 
 buildOcamlJane {
   name = "variantslib";
@@ -10,7 +10,7 @@ buildOcamlJane {
 
   propagatedBuildInputs = [ type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/variantslib";
     description = "OCaml variants as first class values";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/javalib/default.nix b/pkgs/development/ocaml-modules/javalib/default.nix
index f7978cf4805e..13cff62afbf8 100644
--- a/pkgs/development/ocaml-modules/javalib/default.nix
+++ b/pkgs/development/ocaml-modules/javalib/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, which, ocaml, findlib
+{ lib, stdenv, fetchzip, which, ocaml, findlib
 , camlzip, extlib
 }:
 
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ camlzip extlib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A library that parses Java .class files into OCaml data structures";
     homepage = "https://javalib-team.github.io/javalib/";
     license = licenses.lgpl3;
diff --git a/pkgs/development/ocaml-modules/kafka/default.nix b/pkgs/development/ocaml-modules/kafka/default.nix
index 0176daeaf6c5..d1ebe95be89d 100644
--- a/pkgs/development/ocaml-modules/kafka/default.nix
+++ b/pkgs/development/ocaml-modules/kafka/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, buildDunePackage, base, cmdliner, ocaml_lwt,
+{ lib, stdenv, fetchFromGitHub, buildDunePackage, base, cmdliner, ocaml_lwt,
   rdkafka, zlib }:
 
 buildDunePackage rec {
@@ -16,7 +16,7 @@ buildDunePackage rec {
 
   propagatedBuildInputs = [ rdkafka zlib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/didier-wenzek/ocaml-kafka";
     description = "OCaml bindings for Kafka";
     license     = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/lablgl/default.nix b/pkgs/development/ocaml-modules/lablgl/default.nix
index 2172135e8d4c..a7b145c2d4ef 100644
--- a/pkgs/development/ocaml-modules/lablgl/default.nix
+++ b/pkgs/development/ocaml-modules/lablgl/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ocaml, lablgtk, findlib, libGLU, libGL, freeglut, camlp4 } :
+{lib, stdenv, fetchurl, ocaml, lablgtk, findlib, libGLU, libGL, freeglut, camlp4 } :
 
 let
   pname = "lablgl";
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
     cp ./META $out/lib/ocaml/${ocaml.version}/site-lib/lablgl
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html";
     description = "OpenGL bindings for ocaml";
     license = licenses.gpl2;
diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix
index 2b6c3028fd6c..0bc24b539acc 100644
--- a/pkgs/development/ocaml-modules/lablgtk/default.nix
+++ b/pkgs/development/ocaml-modules/lablgtk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub, ocaml, findlib, pkgconfig, gtk2, libgnomecanvas, libglade, gtksourceview }:
+{ lib, stdenv, fetchurl, fetchFromGitHub, ocaml, findlib, pkgconfig, gtk2, libgnomecanvas, libglade, gtksourceview }:
 
 let param =
   let check = stdenv.lib.versionAtLeast ocaml.version; in
@@ -36,7 +36,7 @@ stdenv.mkDerivation {
 
   dontStrip = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     platforms = ocaml.meta.platforms or [];
     maintainers = with maintainers; [
       maggesi roconnor vbgl
diff --git a/pkgs/development/ocaml-modules/lacaml/default.nix b/pkgs/development/ocaml-modules/lacaml/default.nix
index b7f5cb44818b..ab45c9ab8db8 100644
--- a/pkgs/development/ocaml-modules/lacaml/default.nix
+++ b/pkgs/development/ocaml-modules/lacaml/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, darwin, buildDunePackage, dune-configurator
+{ lib, stdenv, fetchurl, darwin, buildDunePackage, dune-configurator
 , lapack, blas
 }:
 
@@ -22,7 +22,7 @@ buildDunePackage rec {
     stdenv.lib.optionals stdenv.isDarwin
       [ darwin.apple_sdk.frameworks.Accelerate ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://mmottl.github.io/lacaml";
     description = "OCaml bindings for BLAS and LAPACK";
     license = licenses.lgpl21Plus;
diff --git a/pkgs/development/ocaml-modules/logs/default.nix b/pkgs/development/ocaml-modules/logs/default.nix
index 50d68520fab0..4a88a26d30d8 100644
--- a/pkgs/development/ocaml-modules/logs/default.nix
+++ b/pkgs/development/ocaml-modules/logs/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild
 , topkg, result, lwt, cmdliner, fmt }:
 let
   pname = "logs";
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
 
   inherit (topkg) installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Logging infrastructure for OCaml";
     homepage = webpage;
     inherit (ocaml.meta) platforms;
diff --git a/pkgs/development/ocaml-modules/macaque/default.nix b/pkgs/development/ocaml-modules/macaque/default.nix
index 32acccd54f28..61ee7ebfe9c5 100644
--- a/pkgs/development/ocaml-modules/macaque/default.nix
+++ b/pkgs/development/ocaml-modules/macaque/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, pgocaml, camlp4 }:
+{ lib, stdenv, fetchzip, ocaml, findlib, ocamlbuild, pgocaml, camlp4 }:
 
 stdenv.mkDerivation {
   name = "ocaml-macaque-0.7.2";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Macros for Caml Queries";
     homepage = "https://github.com/ocsigen/macaque";
     license = licenses.lgpl2;
diff --git a/pkgs/development/ocaml-modules/menhir/default.nix b/pkgs/development/ocaml-modules/menhir/default.nix
index 23e31e75779d..684fd1271aec 100644
--- a/pkgs/development/ocaml-modules/menhir/default.nix
+++ b/pkgs/development/ocaml-modules/menhir/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild
 , version ? if stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.02" then "20190626" else "20140422"
 }@args:
 
diff --git a/pkgs/development/ocaml-modules/menhir/generic.nix b/pkgs/development/ocaml-modules/menhir/generic.nix
index 71561e96cd47..a917d634a19c 100644
--- a/pkgs/development/ocaml-modules/menhir/generic.nix
+++ b/pkgs/development/ocaml-modules/menhir/generic.nix
@@ -1,4 +1,4 @@
-{ version, src, stdenv, ocaml, findlib, ocamlbuild, ... }:
+{ version, src, lib, stdenv, ocaml, findlib, ocamlbuild, ... }:
 
 stdenv.mkDerivation {
   pname = "menhir";
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
     export PREFIX=$out
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://pauillac.inria.fr/~fpottier/menhir/";
     description = "A LR(1) parser generator for OCaml";
     longDescription = ''
diff --git a/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix b/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix
index dc6cef0bbba1..63056481199f 100644
--- a/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix
+++ b/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitLab, libvirt, autoreconfHook, pkg-config, ocaml, findlib, perl }:
+{ lib, stdenv, fetchFromGitLab, libvirt, autoreconfHook, pkg-config, ocaml, findlib, perl }:
 
 stdenv.mkDerivation rec {
   pname = "ocaml-libvirt";
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
 
   installPhase = "make install-opt";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "OCaml bindings for libvirt";
     homepage = "https://libvirt.org/ocaml/";
     license = licenses.gpl2;
diff --git a/pkgs/development/ocaml-modules/ocaml-syntax-shims/default.nix b/pkgs/development/ocaml-modules/ocaml-syntax-shims/default.nix
index 706dc913e1e6..6f9c8f01e904 100644
--- a/pkgs/development/ocaml-modules/ocaml-syntax-shims/default.nix
+++ b/pkgs/development/ocaml-modules/ocaml-syntax-shims/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildDunePackage, fetchurl }:
+{ lib, stdenv, buildDunePackage, fetchurl }:
 
 buildDunePackage rec {
   minimumOCamlVersion = "4.02.3";
@@ -15,7 +15,7 @@ buildDunePackage rec {
 
   doCheck = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/ocaml-ppx/ocaml-syntax-shims";
     description = "Backport new syntax to older OCaml versions";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/ocf/default.nix b/pkgs/development/ocaml-modules/ocf/default.nix
index 7cff7b625b58..c19c9b567a34 100644
--- a/pkgs/development/ocaml-modules/ocf/default.nix
+++ b/pkgs/development/ocaml-modules/ocf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ppx_tools, yojson }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ppx_tools, yojson }:
 
 if stdenv.lib.versionOlder ocaml.version "4.03"
 || stdenv.lib.versionAtLeast ocaml.version "4.08"
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
   })
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "OCaml library to read and write configuration options in JSON syntax";
     homepage = "https://zoggy.github.io/ocf/";
     license = licenses.lgpl3;
diff --git a/pkgs/development/ocaml-modules/odn/default.nix b/pkgs/development/ocaml-modules/odn/default.nix
index c9e5308f8af4..645955f27a9e 100644
--- a/pkgs/development/ocaml-modules/odn/default.nix
+++ b/pkgs/development/ocaml-modules/odn/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, ounit, camlp4 }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, ounit, camlp4 }:
 
 if stdenv.lib.versionAtLeast ocaml.version "4.06"
 then throw "ocaml-data-notation is not available for OCaml ${ocaml.version}"
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
   buildPhase     = "ocaml setup.ml -build";
   installPhase   = "ocaml setup.ml -install";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Store data using OCaml notation";
     homepage = "https://forge.ocamlcore.org/projects/odn/";
     license = licenses.lgpl21;
diff --git a/pkgs/development/ocaml-modules/opti/default.nix b/pkgs/development/ocaml-modules/opti/default.nix
index 82e2378869f6..d229f6284e3d 100644
--- a/pkgs/development/ocaml-modules/opti/default.nix
+++ b/pkgs/development/ocaml-modules/opti/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, buildDunePackage }:
+{ lib, stdenv, fetchurl, buildDunePackage }:
 
 buildDunePackage rec {
   pname = "opti";
@@ -11,7 +11,7 @@ buildDunePackage rec {
     sha256 = "ed9ba56dc06e9d2b1bf097964cc65ea37db787d4f239c13d0dd74693f5b50a1e";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "DSL to generate fast incremental C code from declarative specifications";
     license = licenses.bsd3;
     maintainers = [ maintainers.jmagnusj ];
diff --git a/pkgs/development/ocaml-modules/otfm/default.nix b/pkgs/development/ocaml-modules/otfm/default.nix
index 8d5bf290c6e0..7f68555da089 100644
--- a/pkgs/development/ocaml-modules/otfm/default.nix
+++ b/pkgs/development/ocaml-modules/otfm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf, result }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf, result }:
 
 let
   pname = "otfm";
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "OpenType font decoder for OCaml";
     longDescription = ''
       Otfm is an in-memory decoder for the OpenType font data format. It
diff --git a/pkgs/development/ocaml-modules/pa_bench/default.nix b/pkgs/development/ocaml-modules/pa_bench/default.nix
index 1027d0fc21ab..c0b859c57a30 100644
--- a/pkgs/development/ocaml-modules/pa_bench/default.nix
+++ b/pkgs/development/ocaml-modules/pa_bench/default.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcaml, fetchurl, type_conv, pa_ounit}:
+{lib, stdenv, buildOcaml, fetchurl, type_conv, pa_ounit}:
 
 buildOcaml rec {
   name = "pa_bench";
@@ -14,7 +14,7 @@ buildOcaml rec {
   buildInputs = [ pa_ounit ];
   propagatedBuildInputs = [ type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/pa_bench";
     description = "Syntax extension for inline benchmarks";
     license = stdenv.lib.licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/pa_ounit/default.nix b/pkgs/development/ocaml-modules/pa_ounit/default.nix
index 3bd8baac4b76..9d2fa5bac1a8 100644
--- a/pkgs/development/ocaml-modules/pa_ounit/default.nix
+++ b/pkgs/development/ocaml-modules/pa_ounit/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildOcaml, ocaml, fetchurl, ounit }:
+{ lib, stdenv, buildOcaml, ocaml, fetchurl, ounit }:
 
 if stdenv.lib.versionAtLeast ocaml.version "4.06"
 then throw "pa_ounit is not available for OCaml ${ocaml.version}"
@@ -15,7 +15,7 @@ buildOcaml rec {
 
   propagatedBuildInputs = [ ounit ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/pa_ounit";
     description = "OCaml inline testing";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/parany/default.nix b/pkgs/development/ocaml-modules/parany/default.nix
index 0a4fc9ecea45..34e14959e327 100644
--- a/pkgs/development/ocaml-modules/parany/default.nix
+++ b/pkgs/development/ocaml-modules/parany/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildDunePackage, fetchFromGitHub, ocamlnet, cpu }:
+{ lib, stdenv, buildDunePackage, fetchFromGitHub, ocamlnet, cpu }:
 
 buildDunePackage rec {
   pname = "parany";
@@ -13,7 +13,7 @@ buildDunePackage rec {
 
   propagatedBuildInputs = [ ocamlnet cpu ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     inherit (src.meta) homepage;
     description = "Generalized map/reduce for multicore computing";
     maintainers = [ maintainers.bcdarwin ];
diff --git a/pkgs/development/ocaml-modules/pcre/default.nix b/pkgs/development/ocaml-modules/pcre/default.nix
index 94af6fce2602..210b7d58857c 100644
--- a/pkgs/development/ocaml-modules/pcre/default.nix
+++ b/pkgs/development/ocaml-modules/pcre/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pcre, ocaml, findlib, ocamlbuild }:
+{ lib, stdenv, fetchurl, pcre, ocaml, findlib, ocamlbuild }:
 
 stdenv.mkDerivation rec {
   name = "ocaml${ocaml.version}-pcre-${version}";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   dontConfigure = true;	# Skip configure phase
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://bitbucket.org/mmottl/pcre-ocaml";
     description = "An efficient C-library for pattern matching with Perl-style regular expressions in OCaml";
     license = licenses.lgpl21;
diff --git a/pkgs/development/ocaml-modules/phylogenetics/default.nix b/pkgs/development/ocaml-modules/phylogenetics/default.nix
index 27b6ed3f986b..d3d6097b4462 100644
--- a/pkgs/development/ocaml-modules/phylogenetics/default.nix
+++ b/pkgs/development/ocaml-modules/phylogenetics/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildDunePackage, fetchFromGitHub, ppx_deriving
+{ lib, stdenv, buildDunePackage, fetchFromGitHub, ppx_deriving
 , alcotest, angstrom-unix, biocaml, gnuplot, gsl, lacaml, menhir, owl, printbox }:
 
 buildDunePackage rec {
@@ -22,7 +22,7 @@ buildDunePackage rec {
 
   doCheck = false;  # many tests require bppsuite
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     inherit (src.meta) homepage;
     description = "Bioinformatics library for Ocaml";
     maintainers = [ maintainers.bcdarwin ];
diff --git a/pkgs/development/ocaml-modules/pipebang/default.nix b/pkgs/development/ocaml-modules/pipebang/default.nix
index f62978c0a9cd..fdfbfe83e53d 100644
--- a/pkgs/development/ocaml-modules/pipebang/default.nix
+++ b/pkgs/development/ocaml-modules/pipebang/default.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcaml, fetchurl}:
+{lib, stdenv, buildOcaml, fetchurl}:
 
 buildOcaml rec {
   name = "pipebang";
@@ -11,7 +11,7 @@ buildOcaml rec {
     sha256 = "0acm2y8wxvnapa248lkgm0vcc44hlwhrjxqkx1awjxzcmarnxhfk";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/pipebang";
     description = "Syntax extension to transform x |! f into f x";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix
index 39201d0570b3..7203f3702850 100644
--- a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix
+++ b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, piqi, stdlib-shims }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, piqi, stdlib-shims }:
 
 stdenv.mkDerivation rec {
   version = "0.7.7";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
 
   installPhase = "DESTDIR=$out make install";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://piqi.org";
     description = "Universal schema language and a collection of tools built around it. These are the ocaml bindings";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/piqi/default.nix b/pkgs/development/ocaml-modules/piqi/default.nix
index f3c489723b2f..bbd7746d3665 100644
--- a/pkgs/development/ocaml-modules/piqi/default.nix
+++ b/pkgs/development/ocaml-modules/piqi/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex_2, easy-format, xmlm, base64 }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex_2, easy-format, xmlm, base64 }:
 
 stdenv.mkDerivation rec {
   version = "0.6.15";
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
     make ocaml-install;
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://piqi.org";
     description = "Universal schema language and a collection of tools built around it";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/pprint/default.nix b/pkgs/development/ocaml-modules/pprint/default.nix
index 0e4f9fea7d92..70193d5b568b 100644
--- a/pkgs/development/ocaml-modules/pprint/default.nix
+++ b/pkgs/development/ocaml-modules/pprint/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12";
 
@@ -28,7 +28,7 @@ stdenv.mkDerivation {
   dontBuild = true;
   installFlags = [ "-C" "src" ];
 
-  meta = with stdenv.lib; {
+  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;
diff --git a/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix b/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix
index 32865bed6316..a5531813c42f 100644
--- a/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix
+++ b/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, buildDunePackage, ocaml-migrate-parsetree }:
+{ lib, stdenv, fetchurl, buildDunePackage, ocaml-migrate-parsetree }:
 
 buildDunePackage rec {
   pname = "ppx_gen_rec";
@@ -13,7 +13,7 @@ buildDunePackage rec {
 
   buildInputs = [ ocaml-migrate-parsetree ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/flowtype/ocaml-ppx_gen_rec";
     description = "ocaml preprocessor that generates a recursive module";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/ppx_tools/default.nix b/pkgs/development/ocaml-modules/ppx_tools/default.nix
index 5f3f0916178a..1427485c5ed3 100644
--- a/pkgs/development/ocaml-modules/ppx_tools/default.nix
+++ b/pkgs/development/ocaml-modules/ppx_tools/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, buildDunePackage, ocaml, findlib }:
+{ lib, stdenv, fetchFromGitHub, buildDunePackage, ocaml, findlib }:
 
 let param =
   let v6_2 = {
@@ -39,7 +39,7 @@ let src = fetchFromGitHub {
       inherit (param) sha256;
     };
     pname = "ppx_tools";
-    meta = with stdenv.lib; {
+    meta = with lib; {
       description = "Tools for authors of ppx rewriters";
       homepage = "https://www.lexifi.com/ppx_tools";
       license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/react/default.nix b/pkgs/development/ocaml-modules/react/default.nix
index 02bba95405d5..7ae3e8e66f33 100644
--- a/pkgs/development/ocaml-modules/react/default.nix
+++ b/pkgs/development/ocaml-modules/react/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild }:
+{ lib, stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild }:
 
 stdenv.mkDerivation {
   name = "ocaml-react-1.2.1";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://erratique.ch/software/react";
     description = "Applicative events and signals for OCaml";
     license = licenses.bsd3;
diff --git a/pkgs/development/ocaml-modules/reactivedata/default.nix b/pkgs/development/ocaml-modules/reactivedata/default.nix
index 667c97276045..1a96c734d85a 100644
--- a/pkgs/development/ocaml-modules/reactivedata/default.nix
+++ b/pkgs/development/ocaml-modules/reactivedata/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, react, opaline }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, react, opaline }:
 
 if !stdenv.lib.versionAtLeast ocaml.version "4.04"
 then throw "reactiveData is not available for OCaml ${ocaml.version}"
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
 
   installPhase = "opaline -prefix $out -libdir $OCAMLFIND_DESTDIR";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An OCaml module for functional reactive programming (FRP) based on React";
     homepage = "https://github.com/ocsigen/reactiveData";
     license = licenses.lgpl21;
diff --git a/pkgs/development/ocaml-modules/sawja/default.nix b/pkgs/development/ocaml-modules/sawja/default.nix
index c6cda7d05736..61c3fc862883 100644
--- a/pkgs/development/ocaml-modules/sawja/default.nix
+++ b/pkgs/development/ocaml-modules/sawja/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, which, perl, ocaml, findlib, javalib }:
+{ lib, stdenv, fetchFromGitHub, which, perl, ocaml, findlib, javalib }:
 
 let
   pname = "sawja";
@@ -34,7 +34,7 @@ stdenv.mkDerivation {
 
   propagatedBuildInputs = [ javalib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A library written in OCaml, relying on Javalib to provide a high level representation of Java bytecode programs";
     homepage = webpage;
     license = licenses.gpl3Plus;
diff --git a/pkgs/development/ocaml-modules/secp256k1/default.nix b/pkgs/development/ocaml-modules/secp256k1/default.nix
index aab98a9cc6b3..b066b941259a 100644
--- a/pkgs/development/ocaml-modules/secp256k1/default.nix
+++ b/pkgs/development/ocaml-modules/secp256k1/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, buildDunePackage, base, stdio, dune-configurator, secp256k1 }:
+{ lib, stdenv, fetchFromGitHub, buildDunePackage, base, stdio, dune-configurator, secp256k1 }:
 
 buildDunePackage rec {
   pname = "secp256k1";
@@ -15,7 +15,7 @@ buildDunePackage rec {
 
   buildInputs = [ base stdio dune-configurator secp256k1 ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/dakk/secp256k1-ml";
     description = "Elliptic curve library secp256k1 wrapper for Ocaml";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/sodium/default.nix b/pkgs/development/ocaml-modules/sodium/default.nix
index 5d8154565806..a25145ca49fd 100644
--- a/pkgs/development/ocaml-modules/sodium/default.nix
+++ b/pkgs/development/ocaml-modules/sodium/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, ctypes, libsodium }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, ctypes, libsodium }:
 
 if stdenv.lib.versionAtLeast ocaml.version "4.10"
 then throw "sodium is not available for OCaml ${ocaml.version}"
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
 
   hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/dsheets/ocaml-sodium";
     description = "Binding to libsodium 1.0.9+";
     platforms = ocaml.meta.platforms or [];
diff --git a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix
index a3e26a31a8f9..4fc87ba3d1e4 100644
--- a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix
+++ b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, twt, ocaml_sqlite3 }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, twt, ocaml_sqlite3 }:
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12";
 
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
 
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/mlin/ocaml-sqlite3EZ";
     description = "A thin wrapper for sqlite3-ocaml with a simplified interface";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/syslog/default.nix b/pkgs/development/ocaml-modules/syslog/default.nix
index 2fa032225e7e..6ed4fd0b90eb 100644
--- a/pkgs/development/ocaml-modules/syslog/default.nix
+++ b/pkgs/development/ocaml-modules/syslog/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib }:
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.03.0";
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/rixed/ocaml-syslog";
     description = "Simple wrapper to access the system logger from OCaml";
     license = licenses.lgpl21Plus;
diff --git a/pkgs/development/ocaml-modules/tsdl/default.nix b/pkgs/development/ocaml-modules/tsdl/default.nix
index f614c476140e..0dad4f54e0ab 100644
--- a/pkgs/development/ocaml-modules/tsdl/default.nix
+++ b/pkgs/development/ocaml-modules/tsdl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkgconfig, ocb-stubblr }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkgconfig, ocb-stubblr }:
 
 if !stdenv.lib.versionAtLeast ocaml.version "4.03"
 then throw "tsdl is not available for OCaml ${ocaml.version}"
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = webpage;
     description = "Thin bindings to the cross-platform SDL library";
     license = licenses.isc;
diff --git a/pkgs/development/ocaml-modules/twt/default.nix b/pkgs/development/ocaml-modules/twt/default.nix
index 235d04ba99bd..77635e8848e0 100644
--- a/pkgs/development/ocaml-modules/twt/default.nix
+++ b/pkgs/development/ocaml-modules/twt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, ocaml, findlib }:
+{ lib, stdenv, fetchzip, ocaml, findlib }:
 
 stdenv.mkDerivation {
   name = "ocaml${ocaml.version}-twt-0.94.0";
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
 
   dontStrip = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://people.csail.mit.edu/mikelin/ocaml+twt/";
     description = "“The Whitespace Thing” for OCaml";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/type_conv/108.08.00.nix b/pkgs/development/ocaml-modules/type_conv/108.08.00.nix
index 69439c1c265f..729313144905 100644
--- a/pkgs/development/ocaml-modules/type_conv/108.08.00.nix
+++ b/pkgs/development/ocaml-modules/type_conv/108.08.00.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ocaml, findlib, camlp4}:
+{lib, stdenv, fetchurl, ocaml, findlib, camlp4}:
 
 if !stdenv.lib.versionAtLeast ocaml.version "3.12"
 || stdenv.lib.versionAtLeast ocaml.version "4.03"
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
 
   createFindlibDestdir = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://ocaml.janestreet.com/";
     description = "Support library for OCaml preprocessor type conversions";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/typerep/default.nix b/pkgs/development/ocaml-modules/typerep/default.nix
index 859bd21b0a7c..20fd5bcb03c6 100644
--- a/pkgs/development/ocaml-modules/typerep/default.nix
+++ b/pkgs/development/ocaml-modules/typerep/default.nix
@@ -1,4 +1,4 @@
-{stdenv, buildOcaml, fetchurl, type_conv}:
+{lib, stdenv, buildOcaml, fetchurl, type_conv}:
 
 buildOcaml rec {
   name = "typerep";
@@ -13,7 +13,7 @@ buildOcaml rec {
 
   propagatedBuildInputs = [ type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/typerep";
     description = "Runtime types for OCaml (beta version)";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/uucd/default.nix b/pkgs/development/ocaml-modules/uucd/default.nix
index 355b177b204f..f5d932336150 100644
--- a/pkgs/development/ocaml-modules/uucd/default.nix
+++ b/pkgs/development/ocaml-modules/uucd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, xmlm, topkg }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, xmlm, topkg }:
 
 let
   pname = "uucd";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ xmlm ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An OCaml module to decode the data of the Unicode character database from its XML representation";
     homepage = webpage;
     platforms = ocaml.meta.platforms or [];
diff --git a/pkgs/development/ocaml-modules/uucp/default.nix b/pkgs/development/ocaml-modules/uucp/default.nix
index d657a6f02053..3a0d9f124b1f 100644
--- a/pkgs/development/ocaml-modules/uucp/default.nix
+++ b/pkgs/development/ocaml-modules/uucp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, uunf }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, uunf }:
 
 let
   pname = "uucp";
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
 
   inherit (topkg) installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An OCaml library providing efficient access to a selection of character properties of the Unicode character database";
     homepage = webpage;
     platforms = ocaml.meta.platforms or [];
diff --git a/pkgs/development/ocaml-modules/uuidm/default.nix b/pkgs/development/ocaml-modules/uuidm/default.nix
index 399f147bd0d1..b260a05505bc 100644
--- a/pkgs/development/ocaml-modules/uuidm/default.nix
+++ b/pkgs/development/ocaml-modules/uuidm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }:
 
 stdenv.mkDerivation rec {
   version = "0.9.7";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An OCaml module implementing 128 bits universally unique identifiers version 3, 5 (name based with MD5, SHA-1 hashing) and 4 (random based) according to RFC 4122";
     homepage = "https://erratique.ch/software/uuidm";
     license = licenses.bsd3;
diff --git a/pkgs/development/ocaml-modules/uunf/default.nix b/pkgs/development/ocaml-modules/uunf/default.nix
index 1d0e5b2bcd94..da4b2a175d7c 100644
--- a/pkgs/development/ocaml-modules/uunf/default.nix
+++ b/pkgs/development/ocaml-modules/uunf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, unzip, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner, uucd }:
+{ lib, stdenv, fetchurl, unzip, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner, uucd }:
 let
   pname = "uunf";
   webpage = "https://erratique.ch/software/${pname}";
@@ -50,7 +50,7 @@ stdenv.mkDerivation {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An OCaml module for normalizing Unicode text";
     homepage = webpage;
     platforms = ocaml.meta.platforms or [];
diff --git a/pkgs/development/ocaml-modules/uuseg/default.nix b/pkgs/development/ocaml-modules/uuseg/default.nix
index 8fb9d207576d..c083f5b68f65 100644
--- a/pkgs/development/ocaml-modules/uuseg/default.nix
+++ b/pkgs/development/ocaml-modules/uuseg/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uucp, uutf, cmdliner }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uucp, uutf, cmdliner }:
 
 let
   pname = "uuseg";
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An OCaml library for segmenting Unicode text";
     homepage = webpage;
     platforms = ocaml.meta.platforms or [];
diff --git a/pkgs/development/ocaml-modules/uutf/default.nix b/pkgs/development/ocaml-modules/uutf/default.nix
index f289781b422c..e8179e369afa 100644
--- a/pkgs/development/ocaml-modules/uutf/default.nix
+++ b/pkgs/development/ocaml-modules/uutf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, cmdliner , topkg, uchar }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, cmdliner , topkg, uchar }:
 let
   pname = "uutf";
   webpage = "https://erratique.ch/software/${pname}";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Non-blocking streaming Unicode codec for OCaml";
     homepage = webpage;
     platforms = ocaml.meta.platforms or [];
diff --git a/pkgs/development/ocaml-modules/variantslib/default.nix b/pkgs/development/ocaml-modules/variantslib/default.nix
index ebb0857e9186..f26ccdb39a9a 100644
--- a/pkgs/development/ocaml-modules/variantslib/default.nix
+++ b/pkgs/development/ocaml-modules/variantslib/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildOcaml, ocaml, fetchurl, type_conv }:
+{ lib, stdenv, buildOcaml, ocaml, fetchurl, type_conv }:
 
 if stdenv.lib.versionAtLeast ocaml.version "4.06"
 then throw "variantslib-109.15.03 is not available for OCaml ${ocaml.version}"
@@ -17,7 +17,7 @@ buildOcaml rec {
 
   propagatedBuildInputs = [ type_conv ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/janestreet/variantslib";
     description = "OCaml variants as first class values";
     license = licenses.asl20;
diff --git a/pkgs/development/ocaml-modules/wtf8/default.nix b/pkgs/development/ocaml-modules/wtf8/default.nix
index ea09b326d393..b46386b1666f 100644
--- a/pkgs/development/ocaml-modules/wtf8/default.nix
+++ b/pkgs/development/ocaml-modules/wtf8/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, buildDunePackage }:
+{ lib, stdenv, fetchurl, buildDunePackage }:
 
 buildDunePackage rec {
   pname = "wtf8";
@@ -11,7 +11,7 @@ buildDunePackage rec {
     sha256 = "09ygcxxd5warkdzz17rgpidrd0pg14cy2svvnvy1hna080lzg7vp";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/flowtype/ocaml-wtf8";
     description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
     license = licenses.mit;
diff --git a/pkgs/development/ocaml-modules/xmlm/default.nix b/pkgs/development/ocaml-modules/xmlm/default.nix
index bb05b89d7bef..d1945ea7859a 100644
--- a/pkgs/development/ocaml-modules/xmlm/default.nix
+++ b/pkgs/development/ocaml-modules/xmlm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
 let
   pname = "xmlm";
   webpage = "https://erratique.ch/software/${pname}";
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
   inherit (topkg) buildPhase installPhase;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An OCaml streaming codec to decode and encode the XML data format";
     homepage = webpage;
     platforms = ocaml.meta.platforms or [];
diff --git a/pkgs/development/ocaml-modules/xtmpl/default.nix b/pkgs/development/ocaml-modules/xtmpl/default.nix
index 31c671538a58..50a3eeadec87 100644
--- a/pkgs/development/ocaml-modules/xtmpl/default.nix
+++ b/pkgs/development/ocaml-modules/xtmpl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitLab, ocaml, findlib, iri, ppx_tools, js_of_ocaml
+{ lib, stdenv, fetchFromGitLab, ocaml, findlib, iri, ppx_tools, js_of_ocaml
 , js_of_ocaml-ppx, re }:
 
 if stdenv.lib.versionOlder ocaml.version "4.03"
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
 
   dontStrip = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "XML templating library for OCaml";
     homepage = "https://www.good-eris.net/xtmpl/";
     license = licenses.lgpl3;
diff --git a/pkgs/development/ocaml-modules/yojson/default.nix b/pkgs/development/ocaml-modules/yojson/default.nix
index dca97a53cbfb..21c9a6d19ce8 100644
--- a/pkgs/development/ocaml-modules/yojson/default.nix
+++ b/pkgs/development/ocaml-modules/yojson/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, ocaml, findlib, dune, cppo, easy-format, biniou }:
+{ lib, stdenv, fetchzip, ocaml, findlib, dune, cppo, easy-format, biniou }:
 let
   pname = "yojson";
   param =
@@ -34,7 +34,7 @@ stdenv.mkDerivation ({
   propagatedBuildInputs = [ easy-format biniou ];
   configurePlatforms = [];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An optimized parsing and printing library for the JSON format";
     homepage = "https://github.com/ocaml-community/${pname}";
     license = licenses.bsd3;
diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix
index 175004c71bba..364d76f40fae 100644
--- a/pkgs/development/ocaml-modules/zarith/default.nix
+++ b/pkgs/development/ocaml-modules/zarith/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl
+{ lib, stdenv, fetchurl
 , ocaml, findlib, pkgconfig, perl
 , gmp
 }:
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
 
   preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Fast, arbitrary precision OCaml integers";
     homepage    = "http://forge.ocamlcore.org/projects/zarith";
     license     = licenses.lgpl2;