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:
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, fetchpatch, makeWrapper, wrapGAppsHook
|
||||
{ lib, stdenv, fetchurl, fetchpatch, makeWrapper, wrapGAppsHook
|
||||
|
||||
# Buildtime dependencies.
|
||||
, check, pkgconfig, xxd
|
||||
@@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
|
||||
"TARGET=${uilib}"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/";
|
||||
description = "A free, open source, small web browser";
|
||||
longDescription = ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "netsurf-${libname}";
|
||||
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
|
||||
"PREFIX=$(out)"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/";
|
||||
description = "NetSurf browser shared build system";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, perl
|
||||
{ lib, stdenv, fetchurl, pkgconfig, perl
|
||||
, buildsystem
|
||||
, libparserutils
|
||||
, libwapcaplet
|
||||
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
NIX_CFLAGS_COMPILE= "-Wno-error=implicit-fallthrough";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/${libname}/";
|
||||
description = "Cascading Style Sheets library for netsurf browser";
|
||||
longDescription = ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, expat
|
||||
{ lib, stdenv, fetchurl, pkgconfig, expat
|
||||
, buildsystem
|
||||
, libparserutils
|
||||
, libwapcaplet
|
||||
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/${libname}/";
|
||||
description = "Document Object Model library for netsurf browser";
|
||||
longDescription = ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, perl
|
||||
{ lib, stdenv, fetchurl, pkgconfig, perl
|
||||
, buildsystem
|
||||
, libparserutils
|
||||
}:
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/hubbub/";
|
||||
description = "HTML5 parser library for netsurf browser";
|
||||
longDescription = ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig
|
||||
{ lib, stdenv, fetchurl, pkgconfig
|
||||
, buildsystem
|
||||
}:
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/";
|
||||
description = "BMP Decoder for netsurf browser";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig
|
||||
{ lib, stdenv, fetchurl, pkgconfig
|
||||
, uilib, SDL
|
||||
, buildsystem
|
||||
}:
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
"TARGET=${uilib}"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/${libname}/";
|
||||
description = "Netsurf framebuffer abstraction library";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig
|
||||
{ lib, stdenv, fetchurl, pkgconfig
|
||||
, buildsystem
|
||||
}:
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/${libname}/";
|
||||
description = "GIF Decoder for netsurf browser";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, bison, flex
|
||||
{ lib, stdenv, fetchurl, pkgconfig, bison, flex
|
||||
, buildsystem
|
||||
}:
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/";
|
||||
description = "NetSurf Parametric Logging Library";
|
||||
license = licenses.isc;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig
|
||||
{ lib, stdenv, fetchurl, pkgconfig
|
||||
, buildsystem
|
||||
}:
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/";
|
||||
description = "NetSurf Public Suffix List - Handling library";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig
|
||||
{ lib, stdenv, fetchurl, pkgconfig
|
||||
, buildsystem
|
||||
}:
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/${libname}/";
|
||||
description = "Generalised utility library for netsurf browser";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, perl
|
||||
{ lib, stdenv, fetchurl, perl
|
||||
, buildsystem
|
||||
}:
|
||||
|
||||
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/${libname}/";
|
||||
description = "Parser building library for netsurf browser";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, gperf
|
||||
{ lib, stdenv, fetchurl, pkgconfig, gperf
|
||||
, buildsystem
|
||||
, libdom
|
||||
, libhubbub
|
||||
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/${libname}/";
|
||||
description = "NetSurf SVG decoder";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig
|
||||
{ lib, stdenv, fetchurl, pkgconfig
|
||||
, buildsystem
|
||||
}:
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/${libname}/";
|
||||
description = "UTF8 Processing library for netsurf browser";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl
|
||||
{ lib, stdenv, fetchurl
|
||||
, buildsystem
|
||||
}:
|
||||
|
||||
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/projects/${libname}/";
|
||||
description = "String internment library for netsurf browser";
|
||||
license = licenses.mit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl
|
||||
{ lib, stdenv, fetchurl
|
||||
, flex, bison
|
||||
, buildsystem
|
||||
}:
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.netsurf-browser.org/";
|
||||
description = "Generator for JavaScript bindings for netsurf browser";
|
||||
license = licenses.mit;
|
||||
|
||||
Reference in New Issue
Block a user