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 -1
View File
@@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
passthru.tests = { inherit (nixosTests) bind; };
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://www.isc.org/downloads/bind/";
description = "Domain name server";
license = licenses.mpl20;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
{ lib, stdenv, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "coredns";
@@ -15,7 +15,7 @@ buildGoModule rec {
doCheck = false;
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://coredns.io";
description = "A DNS server that runs middleware";
license = licenses.asl20;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, systemd
{ lib, stdenv, fetchurl, pkgconfig, systemd
, boost, libsodium, libedit, re2
, net-snmp, lua, protobuf, openssl, zlib, h2o
}:
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "DNS Loadbalancer";
homepage = "https://dnsdist.org";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, gtest, c-ares, curl, libev }:
{ lib, stdenv, fetchFromGitHub, cmake, gtest, c-ares, curl, libev }:
stdenv.mkDerivation rec {
pname = "https-dns-proxy";
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
# for when that happens despite there being none as of right now
doCheck = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "DNS to DNS over HTTPS (DoH) proxy";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, gnutls, liburcu, lmdb, libcap_ng, libidn2, libunistring
{ lib, stdenv, fetchurl, pkgconfig, gnutls, liburcu, lmdb, libcap_ng, libidn2, libunistring
, systemd, nettle, libedit, zlib, libiconv, libintl, libmaxminddb, libbpf, nghttp2
, autoreconfHook
}:
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
rm -r "$out"/lib/*.la
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Authoritative-only DNS server from .cz domain registry";
homepage = "https://knot-dns.cz";
license = licenses.gpl3Plus;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch
{ lib, stdenv, fetchurl, fetchpatch
# native deps.
, runCommand, pkgconfig, meson, ninja, makeWrapper
# build+runtime deps.
@@ -84,7 +84,7 @@ unwrapped = stdenv.mkDerivation rec {
meson test --print-errorlogs
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Caching validating DNS resolver, from .cz domain registry";
homepage = "https://knot-resolver.cz";
license = licenses.gpl3Plus;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, libevent, openssl, nixosTests
{ lib, stdenv, fetchurl, libevent, openssl, nixosTests
, bind8Stats ? false
, checking ? false
, ipv6 ? true
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
inherit (nixosTests) nsd;
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "http://www.nlnetlabs.nl";
description = "Authoritative only, high performance, simple and open source name server";
license = licenses.bsd3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, nixosTests
{ lib, stdenv, fetchurl, fetchpatch, pkgconfig, nixosTests
, boost, libyamlcpp, libsodium, sqlite, protobuf, openssl, systemd
, mysql57, postgresql, lua, openldap, geoip, curl, unixODBC
}:
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
nixos = nixosTests.powerdns;
};
meta = with stdenv.lib; {
meta = with lib; {
description = "Authoritative DNS server";
homepage = "https://www.powerdns.com";
platforms = platforms.unix;