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, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "urxvt-autocomplete-all-the-things";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
cp autocomplete-ALL-the-things $out/lib/urxvt/perl
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "urxvt plugin allowing user to easily complete arbitrary text";
homepage = "https://github.com/Vifon/autocomplete-ALL-the-things";
license = licenses.gpl3;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, xrdb, xlsfonts }:
{ lib, stdenv, fetchFromGitHub, xrdb, xlsfonts }:
stdenv.mkDerivation {
name = "urxvt-font-size-2015-05-22";
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
cp font-size $out/lib/urxvt/perl
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Change the urxvt font size on the fly";
homepage = "https://github.com/majutsushi/urxvt-font-size";
license = licenses.mit;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, wmctrl }:
{ lib, stdenv, fetchFromGitHub, wmctrl }:
stdenv.mkDerivation {
name = "urxvt-perl-2015-01-16";
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
cp newterm $out/lib/urxvt/perl
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Perl extensions for the rxvt-unicode terminal emulator";
homepage = "https://github.com/effigies/urxvt-perl";
license = licenses.gpl3;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "urxvt-perls";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
$out/lib/urxvt/perl
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Perl extensions for the rxvt-unicode terminal emulator";
homepage = "https://github.com/muennich/urxvt-perls";
license = licenses.gpl2;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "urxvt-resize-font";
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
cp resize-font $out/lib/urxvt/perl
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "URxvt Perl extension for resizing the font";
homepage = "https://github.com/simmel/urxvt-resize-font";
license = licenses.mit;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, perl }:
{ lib, stdenv, fetchFromGitHub, perl }:
stdenv.mkDerivation rec {
pname = "urxvt-tabbedex";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
installFlags = [ "PREFIX=$(out)" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Tabbed plugin for rxvt-unicode with many enhancements (mina86's fork)";
homepage = "https://github.com/mina86/urxvt-tabbedex";
maintainers = with maintainers; [ abbradar ];
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
rev = "cfcbcc3dd5a5b09a3fec0f6a1fea95f4a36a48c4";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
cp color-themes $out/lib/urxvt/perl
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "urxvt plugin that allows to switch color themes during runtime";
homepage = "https://github.com/felixr/urxvt-theme-switch";
license = "CCBYNC";
@@ -1,4 +1,4 @@
{ stdenv, fetchgit, perl }:
{ lib, stdenv, fetchgit, perl }:
stdenv.mkDerivation {
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
cp vtwheel $out/lib/urxvt/perl
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Pass mouse wheel commands to secondary screens (screen, less, nano, etc)";
homepage = "https://aur.archlinux.org/packages/urxvt-vtwheel";
license = licenses.mit;