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, fetchFromGitHub, coreutils, cpio, findutils, gzip, makeWrapper, util-linux }:
{ lib, stdenv, fetchFromGitHub, coreutils, cpio, findutils, gzip, makeWrapper, util-linux }:
let
version = "0.6";
@@ -34,7 +34,7 @@ stdenv.mkDerivation {
wrapProgram $out/bin/abootimg-unpack-initrd --prefix PATH : ${stdenv.lib.makeBinPath [ cpio gzip ]}
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/ggrandou/abootimg";
description = "Manipulate Android Boot Images";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, python3, platform-tools, makeWrapper
{ lib, stdenv, fetchFromGitHub, python3, platform-tools, makeWrapper
, socat, go-mtpfs, adbfs-rootless
}:
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
runHook postInstall
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A tool to synchronise files between a PC and an Android devices using ADB (Android Debug Bridge)";
homepage = "https://github.com/google/adb-sync";
license = licenses.asl20;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, fuse, adb }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkgconfig, fuse, adb }:
stdenv.mkDerivation rec {
pname = "adbfs-rootless";
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
install -D adbfs $out/bin/adbfs
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Mount Android phones on Linux with adb, no root required";
inherit (src.meta) homepage;
license = licenses.bsd3;
@@ -1,4 +1,4 @@
{ stdenv, fetchzip, bzip2, openssl, zlib }:
{ lib, stdenv, fetchzip, bzip2, openssl, zlib }:
stdenv.mkDerivation rec {
pname = "imgpatchtools";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
installPhase = "install -Dt $out/bin bin/*";
meta = with stdenv.lib; {
meta = with lib; {
description = "Tools to manipulate Android OTA archives";
longDescription = ''
This package is useful for Android development. In particular, it can be
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake }:
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "cmake-modules-webos";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
setupHook = ./cmake-setup-hook.sh;
meta = with stdenv.lib; {
meta = with lib; {
description = "CMake modules needed to build Open WebOS components";
license = licenses.asl20;
maintainers = with maintainers; [ dtzWill ];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, webos, cmake, pkgconfig }:
{ lib, stdenv, fetchFromGitHub, webos, cmake, pkgconfig }:
stdenv.mkDerivation rec {
pname = "novacom";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
substituteInPlace $out/bin/novaterm --replace "exec novacom" "exec $out/bin/novacom"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Utility for communicating with WebOS devices";
license = licenses.asl20;
maintainers = with maintainers; [ dtzWill ];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv,
{ lib, stdenv,
fetchFromGitHub, fetchpatch,
webos, cmake, pkgconfig,
libusb-compat-0_1 }:
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DWEBOS_TARGET_MACHINE_IMPL=host" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Daemon for communicating with WebOS devices";
license = licenses.asl20;
maintainers = with maintainers; [ dtzWill ];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, zlib, libpng, bzip2, libusb-compat-0_1, openssl }:
{ lib, stdenv, fetchFromGitHub, cmake, zlib, libpng, bzip2, libusb-compat-0_1, openssl }:
stdenv.mkDerivation rec {
pname = "xpwn";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib libpng bzip2 libusb-compat-0_1 openssl ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "http://planetbeing.lighthouseapp.com/projects/15246-xpwn";
description = "Custom NOR firmware loader/IPSW generator for the iPhone";
license = licenses.gpl3Plus;