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, perl, zlib, apr, aprutil, pcre, libiconv, lynx
{ lib, stdenv, fetchurl, perl, zlib, apr, aprutil, pcre, libiconv, lynx
, proxySupport ? true
, sslSupport ? true, openssl
, http2Support ? true, nghttp2
@@ -87,7 +87,7 @@ stdenv.mkDerivation rec {
inherit apr aprutil sslSupport proxySupport ldapSupport luaSupport lua5;
};
meta = with stdenv.lib; {
meta = with lib; {
description = "Apache HTTPD, the world's most popular web server";
homepage = "http://httpd.apache.org/";
license = licenses.asl20;
@@ -1,4 +1,4 @@
{ stdenv, apacheHttpd, autoconf, automake, autoreconfHook, curl, fetchFromGitHub, glib, lasso, libtool, libxml2, libxslt, openssl, pkgconfig, xmlsec }:
{ lib, stdenv, apacheHttpd, autoconf, automake, autoreconfHook, curl, fetchFromGitHub, glib, lasso, libtool, libxml2, libxslt, openssl, pkgconfig, xmlsec }:
stdenv.mkDerivation rec {
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
cp ./.libs/mod_auth_mellon.so $out/modules
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/UNINETT/mod_auth_mellon";
description = "An Apache module with a simple SAML 2.0 service provider";
license = licenses.gpl2Plus;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, apacheHttpd, openssl, openldap, apr, aprutil }:
{ lib, stdenv, fetchurl, pkgconfig, apacheHttpd, openssl, openldap, apr, aprutil }:
stdenv.mkDerivation rec {
pname = "mod_ca";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
"LIBEXECDIR=${placeholder ''out''}/modules"
];
meta = with stdenv.lib; {
meta = with lib; {
description = "RedWax CA service module";
homepage = "https://redwax.eu";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
{ lib, stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
stdenv.mkDerivation rec {
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ mod_ca apr aprutil ];
inherit (mod_ca) configureFlags installFlags;
meta = with stdenv.lib; {
meta = with lib; {
description = "RedWax module for Certificate Revocation Lists";
homepage = "https://redwax.eu";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
{ lib, stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
stdenv.mkDerivation rec {
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ mod_ca apr aprutil ];
inherit (mod_ca) configureFlags installFlags;
meta = with stdenv.lib; {
meta = with lib; {
description = "RedWax CA service module to handle Certificate Signing Requests";
homepage = "https://redwax.eu";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, apacheHttpd, apr, avahi }:
{ lib, stdenv, fetchurl, fetchpatch, pkgconfig, apacheHttpd, apr, avahi }:
stdenv.mkDerivation rec {
name = "mod_dnssd-0.6";
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
cp src/.libs/mod_dnssd.so $out/modules
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "http://0pointer.de/lennart/projects/mod_dnssd";
description = "Provide Zeroconf support via DNS-SD using Avahi";
license = licenses.asl20;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
{ lib, stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
stdenv.mkDerivation rec {
pname = "mod_ocsp";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ mod_ca apr aprutil ];
inherit (mod_ca) configureFlags installFlags;
meta = with stdenv.lib; {
meta = with lib; {
description = "RedWax CA service modules of OCSP Online Certificate Validation";
homepage = "https://redwax.eu";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
{ lib, stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
stdenv.mkDerivation rec {
pname = "mod_pkcs12";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ mod_ca apr aprutil ];
inherit (mod_ca) configureFlags installFlags;
meta = with stdenv.lib; {
meta = with lib; {
description = "RedWax CA service modules for PKCS#12 format files";
homepage = "https://redwax.eu";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
{ lib, stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
stdenv.mkDerivation rec {
pname = "mod_scep";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ mod_ca apr aprutil ];
inherit (mod_ca) configureFlags installFlags;
meta = with stdenv.lib; {
meta = with lib; {
description = "RedWax CA service modules for SCEP (Automatic ceritifcate issue/renewal)";
homepage = "https://redwax.eu";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
{ lib, stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
stdenv.mkDerivation rec {
pname = "mod_spkac";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ mod_ca apr aprutil ];
inherit (mod_ca) configureFlags installFlags;
meta = with stdenv.lib; {
meta = with lib; {
description = "RedWax CA service module for handling the Netscape keygen requests. ";
homepage = "https://redwax.eu";
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, apacheHttpd, apr, cairo, iniparser, mapnik }:
{ lib, stdenv, fetchFromGitHub, autoreconfHook, apacheHttpd, apr, cairo, iniparser, mapnik }:
stdenv.mkDerivation rec {
pname = "mod_tile";
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
rm -rf $out/nix
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/openstreetmap/mod_tile";
description = "Efficiently render and serve OpenStreetMap tiles using Apache and Mapnik";
license = licenses.gpl2;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
{ lib, stdenv, fetchurl, pkgconfig, mod_ca, apr, aprutil }:
stdenv.mkDerivation rec {
pname = "mod_timestamp";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ mod_ca apr aprutil ];
inherit (mod_ca) configureFlags installFlags;
meta = with stdenv.lib; {
meta = with lib; {
description = "RedWax CA service module for issuing signed timestamps";
homepage = "https://redwax.eu";
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, apacheHttpd, jdk }:
{ lib, stdenv, fetchurl, apacheHttpd, jdk }:
stdenv.mkDerivation rec {
name = "tomcat-connectors-1.2.48";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
buildInputs = [ apacheHttpd jdk ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Provides web server plugins to connect web servers with Tomcat";
homepage = "https://tomcat.apache.org/download-connectors.cgi";
license = licenses.asl20;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, bzip2
, cmake
, doxygen
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake doxygen pkgconfig ];
buildInputs = [ bzip2 fuse libevent lzma openssl systemd tcp_wrappers zlib ];
meta = with stdenv.lib; {
meta = with lib; {
description = "A caching proxy specialized for linux distribution files";
homepage = "https://www.unix-ag.uni-kl.de/~bloch/acng/";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5
, coreutils, bash, makeWrapper, python3 }:
stdenv.mkDerivation rec {
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/couchdb --suffix PATH : ${bash}/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
homepage = "http://couchdb.apache.org";
license = licenses.asl20;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, erlang, icu, openssl, spidermonkey_68
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_68
, coreutils, bash, makeWrapper, python3 }:
stdenv.mkDerivation rec {
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
cp -r rel/couchdb/* $out
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
homepage = "http://couchdb.apache.org";
license = licenses.asl20;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5, curl, help2man
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5, curl, help2man
, sphinx, which, file, pkgconfig, getopt }:
stdenv.mkDerivation rec {
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
"--enable-js-trunk"
];
meta = with stdenv.lib; {
meta = with lib; {
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
homepage = "http://couchdb.apache.org";
license = licenses.asl20;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "darkhttpd";
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
head -n 18 darkhttpd.c > "$out/share/licenses/darkhttpd/LICENSE"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Small and secure static webserver";
homepage = "https://unix4lyfe.org/darkhttpd/";
license = licenses.bsd3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, libowfat, libcap, zlib, openssl }:
{ lib, stdenv, fetchurl, libowfat, libcap, zlib, openssl }:
let
version = "0.16";
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
make gatling
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A high performance web server";
homepage = "http://www.fefe.de/gatling/";
license = stdenv.lib.licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub
{ lib, stdenv, fetchFromGitHub
, pkgconfig, cmake, ninja
, openssl, libuv, zlib
}:
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig cmake ninja ];
buildInputs = [ openssl libuv zlib ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Optimized HTTP/1 and HTTP/2 server";
homepage = "https://h2o.examp1e.net";
license = licenses.mit;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, fetchFromGitLab
, cmake
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
( if enableToolkit then "-DENABLE_TOOLKIT=on" else "-DENABLE_TOOLKIT=off" )
];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://www.hiawatha-webserver.org";
description = "An advanced and secure webserver";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, python3Packages }:
{ lib, stdenv, fetchurl, python3Packages }:
python3Packages.buildPythonPackage rec {
pname = "hyp-server";
@@ -9,7 +9,7 @@ python3Packages.buildPythonPackage rec {
sha256 = "1lafjdcn9nnq6xc3hhyizfwh6l69lc7rixn6dx65aq71c913jc15";
};
meta = with stdenv.lib; {
meta = with lib; {
description = "Hyperminimal https server";
homepage = "https://github.com/rnhmjoj/hyp";
license = with licenses; [gpl3Plus mit];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip, jdk }:
{ lib, stdenv, fetchurl, unzip, jdk }:
stdenv.mkDerivation {
name = "jboss-as-7.1.1.Final";
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
find $out/bin -name \*.sh -print0 | xargs -0 sed -i -e '/#!\/bin\/sh/aJAVA_HOME=${jdk}'
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://www.jboss.org/";
description = "Open Source J2EE application server";
license = licenses.lgpl21;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, buildPackages, fetchurl, pkgconfig, pcre, libxml2, zlib, bzip2, which, file
{ lib, stdenv, buildPackages, fetchurl, pkgconfig, pcre, libxml2, zlib, bzip2, which, file
, openssl, enableMagnet ? false, lua5_1 ? null
, enableMysql ? false, libmysqlclient ? null
, enableLdap ? false, openldap ? null
@@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
rm "$out/share/lighttpd/doc/config/vhosts.d/Makefile"*
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Lightweight high-performance web server";
homepage = "http://www.lighttpd.net/";
license = stdenv.lib.licenses.bsd3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pkgconfig, zlib, cmake, jemalloc }:
{ lib, stdenv, fetchFromGitHub, pkgconfig, zlib, cmake, jemalloc }:
stdenv.mkDerivation rec {
pname = "lwan";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ jemalloc zlib ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Lightweight high-performance multi-threaded web server";
longDescription = "A lightweight and speedy web server with a low memory
footprint (~500KiB for 10k idle connections), with minimal system calls and
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation {
name = "micro-httpd-20140814";
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
mkdir -p $out/share/man/man8
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "http://acme.com/software/micro_httpd/";
description = "A really small HTTP server";
license = licenses.bsd2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchsvn, autoconf, automake }:
{ lib, stdenv, fetchsvn, autoconf, automake }:
stdenv.mkDerivation rec {
pname = "spawn-fcgi";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
./autogen.sh
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://redmine.lighttpd.net/projects/spawn-fcgi";
description = "Provides an interface to external programs that support the FastCGI interface";
license = licenses.bsd3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, apr, jdk, openssl }:
{ lib, stdenv, fetchurl, apr, jdk, openssl }:
stdenv.mkDerivation rec {
pname = "tomcat-native";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
"--with-ssl=${openssl.dev}"
];
meta = with stdenv.lib; {
meta = with lib; {
description = "An optional component for use with Apache Tomcat that allows Tomcat to use certain native resources for performance, compatibility, etc";
homepage = "https://tomcat.apache.org/native-doc/";
license = licenses.asl20;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, openssl }:
{ lib, stdenv, fetchurl, openssl }:
let
# Let's not pull the whole apache httpd package
mime_file = fetchurl {
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
"prefix=$(out)"
];
meta = with stdenv.lib; {
meta = with lib; {
description = "HTTP server for purely static content";
homepage = "http://linux.bytesex.org/misc/webfs.html";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{stdenv, fetchurl, erlang, pam, perl }:
{lib, stdenv, fetchurl, erlang, pam, perl }:
stdenv.mkDerivation rec {
pname = "yaws";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
sed -i "s#which #type -P #" $out/bin/yaws
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A high performance HTTP 1.1 server in Erlang";
homepage = "http://yaws.hyber.org";
license = licenses.bsd2;