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, fetchgit }:
{ lib, stdenv, fetchgit }:
stdenv.mkDerivation {
name = "win-pvdrivers-git-20150701";
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
cp -r amd64 $out/.
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Xen Subproject: Windows PV Driver";
homepage = "http://xenproject.org/downloads/windows-pv-drivers.html";
maintainers = [ maintainers.tstrobel ];
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, p7zip }:
{ lib, stdenv, fetchurl, p7zip }:
stdenv.mkDerivation {
name = "win-qemu-0.1.105-1";
@@ -28,7 +28,7 @@ stdenv.mkDerivation {
in
(copy "amd64" "w8.1") + (copy "x86" "w8.1");
meta = with stdenv.lib; {
meta = with lib; {
description = "Windows QEMU Drivers";
homepage = "https://fedoraproject.org/wiki/Windows_Virtio_Drivers";
maintainers = [ maintainers.tstrobel ];
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, p7zip }:
{ lib, stdenv, fetchurl, p7zip }:
let
src_x86 = fetchurl {
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
cp amd64/* $out/amd64/.
'';
meta = with stdenv.lib; {
meta = with lib; {
description = ''
A collection of open source Window PV drivers that allow
Windows to be para-virtualized.
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, p7zip, win-virtio }:
{ lib, stdenv, fetchurl, p7zip, win-virtio }:
let
src_usbdk_x86 = fetchurl {
@@ -60,7 +60,7 @@ stdenv.mkDerivation {
in
(copy "amd64" "w8.1") + (copy "x86" "w8.1");
meta = with stdenv.lib; {
meta = with lib; {
description = "Windows SPICE Drivers";
homepage = "https://www.spice-space.org/";
license = [ licenses.asl20 ]; # See https://github.com/vrozenfe/qxl-dod
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, p7zip }:
{ lib, stdenv, fetchurl, p7zip }:
stdenv.mkDerivation rec {
pname = "win-virtio";
version = "0.1.141-1";
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
in
stdenv.lib.concatStringsSep "\n" ((map (copy "amd64" "w8.1") virtio) ++ (map (copy "x86" "w8.1") virtio));
meta = with stdenv.lib; {
meta = with lib; {
description = "Windows VirtIO Drivers";
homepage = "https://fedoraproject.org/wiki/Windows_Virtio_Drivers";
maintainers = [ maintainers.tstrobel ];