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
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip, jre, coreutils, makeDesktopItem }:
{ lib, stdenv, fetchurl, unzip, jre, coreutils, makeDesktopItem }:
stdenv.mkDerivation rec {
pname = "basex";
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
done
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "XML database and XPath/XQuery processor";
longDescription = ''
BaseX is a very fast and light-weight, yet powerful XML database and
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, curl, libiconv }:
{ lib, stdenv, fetchurl, curl, libiconv }:
stdenv.mkDerivation rec {
pname = "html-xml-utils";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [curl libiconv];
meta = with stdenv.lib; {
meta = with lib; {
description = "Utilities for manipulating HTML and XML files";
homepage = "http://www.w3.org/Tools/HTML-XML-utils/";
license = licenses.w3c;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, jre_headless, jdk, ant, saxon }:
{ lib, stdenv, fetchFromGitHub, jre_headless, jdk, ant, saxon }:
stdenv.mkDerivation {
pname = "jing-trang";
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
chmod +x "$out"/bin/*
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A RELAX NG validator in Java";
# The homepage is www.thaiopensource.com, but it links to googlecode.com
# for downloads and call it the "project site".
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, expat }:
{ lib, stdenv, fetchurl, expat }:
stdenv.mkDerivation rec {
pname = "rnv";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [ expat ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Relax NG Compact Syntax validator";
homepage = "http://www.davidashen.net/rnv.html";
license = licenses.bsd3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, libxml2 }:
{ lib, stdenv, fetchurl, pkgconfig, libxml2 }:
stdenv.mkDerivation {
name = "xml2-0.5";
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libxml2 ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://web.archive.org/web/20160515005047/http://dan.egnor.name:80/xml2";
description = "Tools for command line processing of XML, HTML, and CSV";
license = licenses.gpl2Plus;
+1 -1
View File
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
--set PATH "${spath}"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "wtf is my docbook broken?";
homepage = "https://github.com/grahamc/xmloscopy";
license = licenses.mit;