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, fetchFromGitHub, cmake, makeWrapper, boost, libpng, libjpeg, zlib
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, boost, libpng, libjpeg, zlib
, openssl, libwebp, catch }:
stdenv.mkDerivation rec {
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
doCheck = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "A tool to extract files from visual novel archives";
homepage = "https://github.com/vn-tools/arc_unpacker";
license = licenses.gpl3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, fetchFromGitHub
}:
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "PREFIX=$(out)" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/hogliux/bomutils";
description = "Open source tools to create bill-of-materials files used in macOS installers";
platforms = platforms.all;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "cabextract-1.9.1";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "19qwhl2r8ip95q4vxzxg2kp4p125hjmc9762sns1dwwf7ikm7hmg";
};
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://www.cabextract.org.uk/";
description = "Free Software for extracting Microsoft cabinet files";
platforms = platforms.all;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
let
version = "2.13";
@@ -17,7 +17,7 @@ in stdenv.mkDerivation {
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://www.gnu.org/software/cpio/";
description = "A program to create or extract from cpio archives";
license = licenses.gpl3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, fuse, perl }:
{ lib, stdenv, fetchurl, pkgconfig, fuse, perl }:
stdenv.mkDerivation rec {
name = "cromfs-1.5.10.2";
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ fuse perl ];
meta = with stdenv.lib; {
meta = with lib; {
description = "FUSE Compressed ROM filesystem with lzma";
homepage = "https://bisqwit.iki.fi/source/cromfs.html";
license = licenses.gpl3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "ctrtool";
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
cp ctrtool${stdenv.hostPlatform.extensions.executable} $out/bin/
";
meta = with stdenv.lib; {
meta = with lib; {
license = licenses.mit;
description = "A tool to extract data from a 3ds rom";
platforms = platforms.linux;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
, zlib, bzip2, lzma, lzo, lz4, zstd, xz
, libgcrypt, e2fsprogs, util-linux, libgpgerror }:
@@ -25,7 +25,7 @@ in stdenv.mkDerivation {
libgcrypt e2fsprogs util-linux libgpgerror
];
meta = with stdenv.lib; {
meta = with lib; {
description = "File system archiver for linux";
longDescription = ''
FSArchiver is a system tool that allows you to save the contents of a
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, makeWrapper, python
{ lib, stdenv, fetchurl, cmake, makeWrapper, python
, boost, lzma
, withGog ? false, unar ? null }:
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
--prefix PATH : ${stdenv.lib.makeBinPath [ unar ]}
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A tool to unpack installers created by Inno Setup";
homepage = "https://constexpr.org/innoextract/";
license = licenses.zlib;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, libuv, lz4, zlib }:
{ lib, stdenv, fetchFromGitHub, libuv, lz4, zlib }:
stdenv.mkDerivation rec {
pname = "maxcso";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "PREFIX=$(out)" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/unknownbrackets/maxcso";
description =
"A fast ISO to CSO compression program for use with PSP and PS2 emulators, which uses multiple algorithms for best compression ratio";
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "pax";
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
install -Dm444 mans/pax{,cpio,tar}.1 -t $out/share/man/man1/
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "POSIX standard archive tool from MirBSD";
homepage = "https://www.mirbsd.org/pax.htm";
license = licenses.bsd3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, rpm, cpio, substituteAll }:
{ lib, stdenv, rpm, cpio, substituteAll }:
stdenv.mkDerivation {
name = "rpmextract";
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
inherit (stdenv) shell;
};
meta = with stdenv.lib; {
meta = with lib; {
description = "Script to extract RPM archives";
platforms = platforms.all;
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, gettext, coreutils }:
{ lib, stdenv, fetchurl, gettext, coreutils }:
stdenv.mkDerivation rec {
name = "sharutils-4.15.2";
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
doCheck = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "Tools for remote synchronization and `shell archives'";
longDescription =
'' GNU shar makes so-called shell archives out of many files, preparing
+1 -1
View File
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
# run. That's why we generate it.
nativeBuildInputs = [ autoreconfHook pkgconfig ];
meta = with stdenv.lib; {
meta = with lib; {
description = "A compression/decompression tool based on snappy";
homepage = "https://github.com/kubo/snzip";
maintainers = with maintainers; [ doronbehar ];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, installShellFiles, gnustep, bzip2, zlib, icu, openssl, wavpack }:
{ lib, stdenv, fetchFromGitHub, installShellFiles, gnustep, bzip2, zlib, icu, openssl, wavpack }:
stdenv.mkDerivation rec {
pname = "unar";
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://theunarchiver.com";
description = "An archive unpacker program";
longDescription = ''
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, zlib, bzip2, lzfse, pkg-config }:
{ lib, stdenv, fetchFromGitHub, zlib, bzip2, lzfse, pkg-config }:
stdenv.mkDerivation rec {
version = "1.1.0";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "PREFIX=$(out)" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/matthewbauer/undmg";
description = "Extract a DMG file";
license = licenses.gpl3;
+1 -1
View File
@@ -34,7 +34,7 @@ in stdenv.mkDerivation {
--prefix PATH : ${lib.makeBinPath runtime_bins}
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Command line tool for unpacking archives easily";
homepage = "https://packages.qa.debian.org/u/unp.html";
license = with licenses; [ gpl2 ];
+2 -2
View File
@@ -1,4 +1,4 @@
{stdenv, fetchurl}:
{lib, stdenv, fetchurl}:
stdenv.mkDerivation rec {
pname = "unrar";
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; {
meta = with lib; {
description = "Utility for RAR archives";
homepage = "https://www.rarlab.com/";
license = licenses.unfreeRedistributable;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, zlib, openssl }:
{ lib, stdenv, fetchFromGitHub, cmake, zlib, openssl }:
stdenv.mkDerivation rec {
pname = "unshield";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib openssl ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Tool and library to extract CAB files from InstallShield installers";
homepage = "https://github.com/twogood/unshield";
license = licenses.mit;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper
{ lib, stdenv, fetchurl, makeWrapper
, pkgconfig, openssl, fuse, libxml2
, cabextract ? null
, cdrkit ? null
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
patchShebangs tests
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://wimlib.net";
description = "A library and program to extract, create, and modify WIM files";
platforms = platforms.unix;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, enableNLS ? false, libnatspec ? null, libiconv }:
{ lib, stdenv, fetchurl, enableNLS ? false, libnatspec ? null, libiconv }:
assert enableNLS -> libnatspec != null;
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
buildInputs = stdenv.lib.optional enableNLS libnatspec
++ stdenv.lib.optional stdenv.isCygwin libiconv;
meta = with stdenv.lib; {
meta = with lib; {
description = "Compressor/archiver for creating and modifying zipfiles";
homepage = "http://www.info-zip.org";
license = licenses.bsdOriginal;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, perl, unzip }:
{ lib, stdenv, fetchFromGitHub, perl, unzip }:
stdenv.mkDerivation rec {
pname = "zpaq";
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
installFlags = [ "PREFIX=$(out)" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Incremental journaling backup utility and archiver";
homepage = "http://mattmahoney.net/dc/zpaq.html";
license = licenses.gpl3Plus ;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip }:
{ lib, stdenv, fetchurl, unzip }:
let
# Generated upstream information
@@ -39,7 +39,7 @@ stdenv.mkDerivation {
cp readme_zpaqd.txt "$out/share/doc/zpaq"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "ZPAQ archive (de)compressor and algorithm development tool";
license = licenses.gpl3Plus ;
maintainers = with maintainers; [ raskin ];