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
This commit is contained in:
Profpatsch
2021-01-11 10:38:22 +01:00
parent e87aef06e0
commit 4a7f99d55d
6869 changed files with 13585 additions and 13580 deletions
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;