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, guile, guile-lib, cairo, expat }:
{ lib, stdenv, fetchurl, pkgconfig, guile, guile-lib, cairo, expat }:
stdenv.mkDerivation rec {
pname = "guile-cairo";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
doCheck = false; # Cannot find unit-test module from guile-lib
checkInputs = [ guile-lib ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Cairo bindings for GNU Guile";
longDescription = ''
Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, guile, texinfo }:
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, guile, texinfo }:
let
version = "1.0.0";
@@ -18,7 +18,7 @@ in stdenv.mkDerivation {
autoreconfPhase = "./autogen.sh";
meta = with stdenv.lib; {
meta = with lib; {
description = "Concurrent ML-like concurrency for Guile";
homepage = "https://github.com/wingo/fibers";
license = licenses.lgpl3Plus;
@@ -1,4 +1,4 @@
{ fetchurl, stdenv, guile, guile-lib, gwrap
{ fetchurl, lib, stdenv, guile, guile-lib, gwrap
, pkgconfig, gconf, glib, gnome_vfs, gtk2
, libglade, libgnome, libgnomecanvas, libgnomeui
, pango, guile-cairo, texinfo
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
GUILE_AUTO_COMPILE = 0;
meta = with stdenv.lib; {
meta = with lib; {
description = "GNOME bindings for GNU Guile";
longDescription = ''
GNU guile-gnome brings the power of Scheme to your graphical application.
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, guile, texinfo, pkgconfig }:
{ lib, stdenv, fetchurl, guile, texinfo, pkgconfig }:
assert stdenv ? cc && stdenv.cc.isGNU;
@@ -24,7 +24,7 @@ in stdenv.mkDerivation {
"$(dirname $(echo ${stdenv.cc.cc.lib}/lib*/libgcc_s.so))''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A collection of useful Guile Scheme modules";
longDescription = ''
guile-lib is intended as an accumulation place for pure-scheme Guile
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, guile, ncurses, libffi }:
{ lib, stdenv, fetchurl, pkgconfig, guile, ncurses, libffi }:
let
name = "guile-ncurses-${version}";
@@ -28,7 +28,7 @@ in stdenv.mkDerivation {
# XXX: 1 of 65 tests failed.
doCheck = false;
meta = with stdenv.lib; {
meta = with lib; {
description = "Scheme interface to the NCurses libraries";
longDescription = ''
GNU Guile-Ncurses is a library for the Guile Scheme interpreter that
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, guile }:
{ lib, stdenv, fetchurl, pkgconfig, guile }:
let
name = "guile-opengl-${version}";
@@ -13,7 +13,7 @@ in stdenv.mkDerivation {
nativeBuildInputs = [ pkgconfig guile ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Guile bindings for the OpenGL graphics API";
homepage = "https://www.gnu.org/software/guile-opengl/";
license = licenses.gpl3Plus;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig
{ lib, stdenv, fetchurl, fetchpatch, pkgconfig
, gperf, guile, guile-lib, libffi }:
with stdenv.lib;
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-guilemoduledir=$(out)/share/guile/site" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "A simple framework for building readers for GNU Guile";
longDescription = ''
Guile-Reader is a simple framework for building readers for GNU
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, guile, buildEnv
{ lib, stdenv, fetchurl, pkgconfig, guile, buildEnv
, SDL, SDL_image, SDL_ttf, SDL_mixer
}:
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
};
in [ "SDLMINUSI=-I${sdl}/include/SDL" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Guile bindings for SDL";
homepage = "https://www.gnu.org/software/guile-sdl/";
license = licenses.gpl3Plus;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, guile, libtool, pkgconfig
{ lib, stdenv, fetchurl, guile, libtool, pkgconfig
, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer
}:
@@ -28,7 +28,7 @@ in stdenv.mkDerivation {
makeFlags = [ "GUILE_AUTO_COMPILE=0" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Bindings to SDL2 for GNU Guile";
homepage = "https://dthompson.us/projects/guile-sdl2.html";
license = licenses.lgpl3Plus;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, guile, texinfo }:
{ lib, stdenv, fetchurl, pkgconfig, guile, texinfo }:
let
name = "guile-xcb-${version}";
@@ -21,7 +21,7 @@ in stdenv.mkDerivation {
";
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "XCB bindings for Guile";
homepage = "http://www.markwitmer.com/guile-xcb/guile-xcb.html";
license = licenses.gpl3Plus;