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, cmake, zlib, Cocoa }:
{ lib, stdenv, fetchFromGitHub, cmake, zlib, Cocoa }:
stdenv.mkDerivation rec {
pname = "atomicparsley";
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A CLI program for reading, parsing and setting metadata into MPEG-4 files";
homepage = "https://github.com/wez/atomicparsley";
license = licenses.gpl2Plus;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub
{ lib, stdenv, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
find -maxdepth 1 -executable -type f -exec mv --target-directory="$out/bin" {} \;
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Full-featured MP4 format and MPEG DASH library and tools";
homepage = "http://bento4.com";
license = licenses.gpl2Plus;
+2 -2
View File
@@ -1,4 +1,4 @@
{ fetchFromGitHub, stdenv, libunwind, libraw1394, libjpeg, libiec61883, libdv
{ fetchFromGitHub, lib, stdenv, libunwind, libraw1394, libjpeg, libiec61883, libdv
, libavc1394, pkgconfig, autoreconfHook }:
stdenv.mkDerivation {
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
autoreconfHook pkgconfig
];
meta = with stdenv.lib; {
meta = with lib; {
description = "Receive and store audio & video over IEEE1394";
longDescription = ''
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub
{ lib, stdenv, fetchFromGitHub
, ffmpeg_3
, imagemagick
, makeWrapper
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Command line interface for processing media filmed on GoPro HERO 3, 4, 5, 6, and 7 cameras";
homepage = "https://github.com/KonradIT/gopro-linux";
platforms = platforms.linux;
+1 -1
View File
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "lib" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "A suite of programs for processing MPEG or MJPEG video";
homepage = "http://mjpeg.sourceforge.net/";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, nasm }:
{ lib, stdenv, fetchFromGitHub, cmake, nasm }:
stdenv.mkDerivation rec {
pname = "svt-av1";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake nasm ];
meta = with stdenv.lib; {
meta = with lib; {
description = "AV1-compliant encoder/decoder library core";
homepage = "https://github.com/AOMediaCodec/SVT-AV1";
license = licenses.bsd2;
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, ffmpeg, libui }:
{ lib, stdenv, fetchFromGitHub, ffmpeg, libui }:
stdenv.mkDerivation {
pname = "untrunc-anthwlock";
@@ -26,7 +26,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "Restore a truncated mp4/mov (improved version of ponchio/untrunc)";
homepage = "https://github.com/anthwlock/untrunc";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, gcc, libav_12, fetchFromGitHub }:
{ lib, stdenv, gcc, libav_12, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "untrunc";
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
-I$libavConfiguredSrc -lavformat -lavcodec -lavutil
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Restore a damaged (truncated) mp4, m4v, mov, 3gp video from a similar, undamaged video";
license = licenses.gpl2;
homepage = "https://github.com/ponchio/untrunc";
+2 -2
View File
@@ -1,5 +1,5 @@
{
stdenv,
lib, stdenv,
fetchurl,
}:
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
install -D {,$out/share/man/}man1/yamdi.1
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Yet Another MetaData Injector for FLV";
homepage = "http://yamdi.sourceforge.net/";
license = licenses.bsd3;