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, pkgconfig, intltool, glib, exo, libXtst, xorgproto, libxfce4util, xfce4-panel, libxfce4ui, xfconf, gtk3, hicolor-icon-theme, xfce }:
{ lib, stdenv, fetchurl, pkgconfig, intltool, glib, exo, libXtst, xorgproto, libxfce4util, xfce4-panel, libxfce4ui, xfconf, gtk3, hicolor-icon-theme, xfce }:
let
category = "panel-plugins";
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-cpugraph-plugin";
description = "CPU graph show for Xfce panel";
license = licenses.gpl2Plus;
@@ -1,5 +1,5 @@
{ mkXfceDerivation
, stdenv
, lib, stdenv
, intltool
, libxfce4ui
, xfce4-panel
@@ -26,7 +26,7 @@ mkXfceDerivation {
xfce4-panel
];
meta = with stdenv.lib; {
meta = with lib; {
description = "Shows the date and time in the panel, and a calendar appears when you left-click on it";
maintainers = [ maintainers.AndersonTorres ];
};
@@ -1,4 +1,4 @@
{ stdenv, pkgconfig, fetchFromGitHub, python2, bash, vala_0_46
{ lib, stdenv, pkgconfig, fetchFromGitHub, python2, bash, vala_0_46
, dockbarx, gtk2, xfce, pythonPackages, wafHook }:
stdenv.mkDerivation rec {
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
wrapPythonProgramsIn "$out/share/xfce4/panel/plugins" "$out $pythonPath"
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/TiZ-EX1/xfce4-dockbarx-plugin";
description = "A plugins to embed DockbarX into xfce4-panel";
license = licenses.mit;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, xfconf, gtk3, xfce }:
{ lib, stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, xfconf, gtk3, xfce }:
let
category = "panel-plugins";
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-eyes-plugin";
description = "Rolling eyes (following mouse pointer) plugin for the Xfce panel";
license = licenses.gpl2Plus;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, xfconf, gtk3, xfce }:
{ lib, stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, xfconf, gtk3, xfce }:
let
category = "panel-plugins";
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-fsguard-plugin";
description = "Filesystem usage monitor plugin for the Xfce panel";
license = licenses.bsd2;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, gtk3, xfce }:
{ lib, stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, gtk3, xfce }:
let
category = "panel-plugins";
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin";
description = "Generic monitor plugin for the Xfce panel";
license = licenses.gpl2Plus;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, autoreconfHook, gnome2, gtkmm2,
{ lib, stdenv, fetchurl, pkgconfig, intltool, autoreconfHook, gnome2, gtkmm2,
libgtop, libxfce4ui, libxfce4util, xfce4-panel, lm_sensors, xfce
}:
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://goodies.xfce.org/projects/panel-plugins/xfce4-hardware-monitor-plugin";
description = "Hardware monitor plugin for the XFCE4 panel";
license = licenses.gpl3;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui,
{ lib, stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui,
gtk2, exo, gnutls, libgcrypt, xfce }:
let
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-mailwatch-plugin";
description = "Mail watcher plugin for Xfce panel";
license = licenses.gpl2;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel,
{ lib, stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel,
libxfce4ui, gtk3, exo, xfce }:
let
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-mpc-plugin";
description = "MPD plugin for Xfce panel";
platforms = platforms.linux;
@@ -1,4 +1,4 @@
{ stdenv, pkgconfig, fetchFromGitHub, python3, vala_0_46
{ lib, stdenv, pkgconfig, fetchFromGitHub, python3, vala_0_46
, gtk3, libwnck3, libxfce4util, xfce4-panel, wafHook, xfce }:
stdenv.mkDerivation rec {
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
rev-prefix = "v";
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/HugLifeTiZ/xfce4-namebar-plugin";
description = "Plugin which integrates titlebar and window controls into the xfce4-panel";
license = licenses.mit;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, xfconf, gtk2, libunique, xfce }:
{ lib, stdenv, fetchurl, fetchpatch, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, xfconf, gtk2, libunique, xfce }:
let
category = "panel-plugins";
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-notes-plugin";
description = "Sticky notes plugin for Xfce panel";
license = licenses.gpl2Plus;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, gtk3, libxfce4ui,
{ lib, stdenv, fetchurl, pkgconfig, intltool, gtk3, libxfce4ui,
libxfce4util, xfce4-panel, libnotify, lm_sensors, hddtemp, netcat-gnu, xfce
}:
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-sensors-plugin";
description = "A panel plug-in for different sensors using acpi, lm_sensors and hddtemp";
license = licenses.gpl2;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, gtk3, xfce }:
{ lib, stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, gtk3, xfce }:
let
category = "panel-plugins";
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-systemload-plugin";
description = "System load plugin for Xfce panel";
license = licenses.bsd2;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, gtk3, hicolor-icon-theme, xfce }:
{ lib, stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4-panel, libxfce4ui, gtk3, hicolor-icon-theme, xfce }:
let
category = "panel-plugins";
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-timer-plugin";
description = "Simple countdown and alarm plugin for the Xfce panel";
platforms = platforms.linux;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, vala, glib, gtk2, gtk3 }:
{ lib, stdenv, fetchFromGitHub, cmake, vala, glib, gtk2, gtk3 }:
stdenv.mkDerivation rec {
pname = "vala-panel-appmenu-xfce";
version = "0.6.94";
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
cp -r output/var/empty/* "$out"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Port of the Unity GTK Module";
license = licenses.lgpl3;
maintainers = with maintainers; [ jD91mZM2 ];
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, substituteAll, callPackage, pkgconfig, cmake, vala, libxml2,
{ lib, stdenv, fetchFromGitHub, substituteAll, callPackage, pkgconfig, cmake, vala, libxml2,
glib, pcre, gtk2, gtk3, xorg, libxkbcommon, epoxy, at-spi2-core, dbus-glib, bamf,
xfce, libwnck3, libdbusmenu, gobject-introspection }:
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.gitLister src.meta.homepage;
};
meta = with stdenv.lib; {
meta = with lib; {
description = "Global Menu applet for XFCE4";
license = licenses.lgpl3;
maintainers = with maintainers; [ jD91mZM2 ];
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, gtk3, libxml2, libsoup, upower,
{ lib, stdenv, fetchurl, pkgconfig, intltool, gtk3, libxml2, libsoup, upower,
libxfce4ui, libxfce4util, xfce4-panel, hicolor-icon-theme, xfce }:
let
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
versionLister = xfce.archiveLister category pname;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-weather-plugin";
description = "Weather plugin for the Xfce desktop environment";
license = licenses.gpl2Plus;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pkgconfig, intltool, python3, imagemagick, libwnck, gtk2
{ lib, stdenv, fetchFromGitHub, pkgconfig, intltool, python3, imagemagick, libwnck, gtk2
, exo, libxfce4ui, libxfce4util, xfce4-panel, xfconf, xfce4-dev-tools, xfce }:
stdenv.mkDerivation rec {
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
rev-prefix = "v";
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://goodies.xfce.org/projects/panel-plugins/xfce4-windowck-plugin";
description = "Xfce plugins which allows to put the maximized window title and buttons on the panel";
license = licenses.gpl2Plus;