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, fetchurl, cmake, fcitx, anthy, gettext, pkg-config }:
{ lib, stdenv, fetchurl, cmake, fcitx, anthy, gettext, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-anthy";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
description = "Fcitx Wrapper for anthy";
license = licenses.gpl2Plus;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, fcitx, gettext, libchewing, pkg-config }:
{ lib, stdenv, fetchurl, cmake, fcitx, gettext, libchewing, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-chewing";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-chewing";
downloadPage = "http://download.fcitx-im.org/fcitx-chewing/";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, pkg-config, fcitx, gettext, curl }:
{ lib, stdenv, fetchurl, cmake, pkg-config, fcitx, gettext, curl }:
stdenv.mkDerivation rec {
pname = "fcitx-cloudpinyin";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
description = "A standalone module for fcitx that uses web API to provide better pinyin result";
homepage = "https://github.com/fcitx/fcitx-cloudpinyin";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, fcitx, libhangul, gettext, pkg-config }:
{ lib, stdenv, fetchurl, cmake, fcitx, libhangul, gettext, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-hangul";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-hangul";
downloadPage = "http://download.fcitx-im.org/fcitx-hangul/";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, pkg-config, fcitx, gettext, libpinyin, glib, pcre, dbus, qtwebengine, qtbase, fcitx-qt5 }:
{ lib, stdenv, fetchurl, cmake, pkg-config, fcitx, gettext, libpinyin, glib, pcre, dbus, qtwebengine, qtbase, fcitx-qt5 }:
stdenv.mkDerivation rec {
pname = "fcitx-libpinyin";
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/${ZHUYIN_DATA_FILE_NAME}
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
description = "Fcitx Wrapper for libpinyin, Library to deal with pinyin";
homepage = "https://github.com/fcitx/fcitx-libpinyin";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, fcitx, gettext, m17n_lib, m17n_db, pkg-config }:
{ lib, stdenv, fetchurl, cmake, fcitx, gettext, m17n_lib, m17n_db, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-m17n";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-m17n";
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, pkg-config, fcitx, librime, brise, hicolor-icon-theme }:
{ lib, stdenv, fetchurl, cmake, pkg-config, fcitx, librime, brise, hicolor-icon-theme }:
stdenv.mkDerivation rec {
pname = "fcitx-rime";
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-rime";
downloadPage = "https://download.fcitx-im.org/fcitx-rime/";
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, fcitx, libskk, skk-dicts }:
{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig, fcitx, libskk, skk-dicts }:
stdenv.mkDerivation {
pname = "fcitx-skk";
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
description = "A SKK style input method engine for fcitx";
longDescription = ''
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, fcitx, gettext }:
{ lib, stdenv, fetchurl, cmake, fcitx, gettext }:
stdenv.mkDerivation rec {
pname = "fcitx-table-extra";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-table-extra";
downloadPage = "http://download.fcitx-im.org/fcitx-table-extra/";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, fcitx, gettext }:
{ lib, stdenv, fetchurl, cmake, fcitx, gettext }:
stdenv.mkDerivation rec {
pname = "fcitx-table-other";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-table-other";
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, fcitx, gettext, pkg-config }:
{ lib, stdenv, fetchurl, cmake, fcitx, gettext, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-unikey";
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
--replace ${fcitx} $out
'';
meta = with stdenv.lib; {
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-unikey";
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";