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, fetchurl, util-linux
{ lib, stdenv, fetchurl, util-linux
, cdparanoia, cdrdao, dvdplusrwtools, flac, lame, mpg123, normalize
, vorbis-tools, xorriso }:
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
sh Install.sh --prefix $out
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Bash script CD Burner Writer";
longDescription = ''
It might not be the best looking application out there, but it works.
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "bchunk";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
install -Dt $out/share/man/man1 bchunk.1
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "http://he.fi/bchunk/";
description = "A program that converts CD images in BIN/CUE format into a set of ISO and CDR tracks";
platforms = platforms.unix;
+1 -1
View File
@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
gappsWrapperArgs+=(--prefix PATH : "${binpath}")
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A Gnome CD/DVD Burner";
homepage = "https://wiki.gnome.org/Apps/Brasero";
maintainers = [ maintainers.bdimcheff ];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "ccd2iso-0.3";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "1z000zi7hpr2h9cabj6hzf3n6a6gd6glmm8nn36v4b8i4vzbhx7q";
};
meta = with stdenv.lib; {
meta = with lib; {
description = "CloneCD to ISO converter";
homepage = "https://sourceforge.net/projects/ccd2iso/";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{stdenv, fetchurl}:
{lib, stdenv, fetchurl}:
stdenv.mkDerivation rec {
pname = "cdi2iso";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
cp cdi2iso $out/bin/
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A very simple utility for converting DiscJuggler images to the standard ISO-9660 format";
homepage = "https://sourceforge.net/projects/cdi2iso.berlios";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromRepoOrCz, autoreconfHook, makeWrapper, libdvdcss, libdvdread, perl, perlPackages, asciidoc, xmlto, sourceHighlight, docbook_xsl, docbook_xml_dtd_45 }:
{ lib, stdenv, fetchFromRepoOrCz, autoreconfHook, makeWrapper, libdvdcss, libdvdread, perl, perlPackages, asciidoc, xmlto, sourceHighlight, docbook_xsl, docbook_xml_dtd_45 }:
stdenv.mkDerivation {
pname = "cdimgtools";
@@ -26,7 +26,7 @@ stdenv.mkDerivation {
installTargets = [ "install" "install-doc" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://repo.or.cz/cdimgtools.git/blob_plain/refs/heads/release:/README.html";
description = "Tools to inspect and manipulate CD/DVD optical disc images";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{stdenv, fetchurl, libvorbis, libmad, pkgconfig, libao}:
{lib, stdenv, fetchurl, libvorbis, libmad, pkgconfig, libao}:
stdenv.mkDerivation {
name = "cdrdao-1.2.3";
@@ -28,7 +28,7 @@ stdenv.mkDerivation {
# Needed on gcc >= 6.
NIX_CFLAGS_COMPILE = "-Wno-narrowing";
meta = with stdenv.lib; {
meta = with lib; {
description = "A tool for recording audio or data CD-Rs in disk-at-once (DAO) mode";
homepage = "http://cdrdao.sourceforge.net/";
platforms = platforms.linux;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, m4, acl, libcap, Carbon, IOKit }:
{ lib, stdenv, fetchurl, m4, acl, libcap, Carbon, IOKit }:
stdenv.mkDerivation rec {
pname = "cdrtools";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = false; # parallel building fails on some linux machines
meta = with stdenv.lib; {
meta = with lib; {
homepage = "http://cdrtools.sourceforge.net/private/cdrecord.html";
description = "Highly portable CD/DVD/BluRay command line recording software";
license = with licenses; [ cddl gpl2 lgpl21 ];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook
{ lib, stdenv, fetchFromGitHub, autoreconfHook
, bison, flac, flex, id3v2, vorbis-tools
}:
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
ln -s $out/bin/cuetag.sh $out/bin/cuetag
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A set of utilities for working with cue files and toc files";
homepage = "https://github.com/svend/cuetools";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, cdrtools, m4 }:
{ lib, stdenv, fetchurl, fetchpatch, cdrtools, m4 }:
stdenv.mkDerivation rec {
pname = "dvd+rw-tools";
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "prefix=${placeholder "out"}" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "http://fy.chalmers.se/~appro/linux/DVD+RW/tools";
description = "Tools for mastering Blu-ray and DVD+-RW/+-R media";
platforms = platforms.linux;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "dvd-vr";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
makeFlags = [ "PREFIX=$(out)" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://www.pixelbeat.org/programs/dvd-vr/";
downloadPage = "https://www.pixelbeat.org/programs/dvd-vr/";
description = "A utility to identify and optionally copy recordings from a DVD-VR format disc";
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, gettext, which
{ lib, stdenv, fetchurl, pkgconfig, gettext, which
, glib, gtk2
, enableSoftening ? true
}:
@@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
done
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "http://dvdisaster.net/";
description = "Data loss/scratch/aging protection for CD/DVD media";
longDescription = ''
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "ecm-tools";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
(cd $out/bin; ln -s bin2ecm ecm2bin)
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A utility to uncompress ECM files to BIN CD format";
homepage = "https://github.com/alucryd/ecm-tools";
license = licenses.gpl3;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, python3
, fetchFromGitHub
}:
@@ -16,7 +16,7 @@ python3.pkgs.buildPythonApplication rec {
propagatedBuildInputs = with python3.pkgs; [ setuptools six ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/KBNLresearch/isolyzer";
description = "Verify size of ISO 9660 image against Volume Descriptor fields";
license = licenses.asl20;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub
{ lib, stdenv, fetchFromGitHub
, python3
, popt
}:
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
# we don't install python stuff as it borks up directories
installTargets = [ "install-bin" "install-devel" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/rhinstaller/isomd5sum";
description = "Utilities for working with md5sum implanted in ISO images";
platforms = platforms.linux;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, libdvdread, pkgconfig }:
{ lib, stdenv, fetchurl, libdvdread, pkgconfig }:
let
version = "0.17";
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
buildInputs = [ libdvdread ];
nativeBuildInputs = [ pkgconfig ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://sourceforge.net/projects/lsdvd/";
description = "Display information about audio, video, and subtitle tracks on a DVD";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{stdenv, fetchgit}:
{lib, stdenv, fetchgit}:
stdenv.mkDerivation rec {
pname = "mdf2iso";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "0xg43jlvrk8adfjgbjir15nxwcj0nhz4gxpqx7jdfvhg0kwliq0n";
};
meta = with stdenv.lib; {
meta = with lib; {
description = "Small utility that converts MDF images to ISO format";
homepage = src.url;
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "mkcue";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
preInstall = "mkdir -pv $out/bin";
postInstall = "chmod -v +w $out/bin/mkcue";
meta = with stdenv.lib; {
meta = with lib; {
description = "Generates CUE sheets from a CD TOC";
license = licenses.lgpl2Plus;
platforms = platforms.linux;
+2 -2
View File
@@ -1,4 +1,4 @@
{stdenv, fetchurl}:
{lib, stdenv, fetchurl}:
stdenv.mkDerivation rec {
pname = "nrg2iso";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
cp -v nrg2iso $out/bin/nrg2iso
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A linux utils for converting CD (or DVD) image generated by Nero Burning Rom to ISO format";
homepage = "http://gregory.kokanosky.free.fr/v4/linux/nrg2iso.en.html";
license = licenses.gpl2;
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
}:
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
"PREFIX=$(out)"
];
meta = with stdenv.lib; {
meta = with lib; {
description = "Converts SACD image files, Philips DSDIFF and Sony DSF files to 24-bit high resolution wave files. Handles both DST and DSD streams. ";
longDescription = ''
Super Audio CD decoder. Converts SACD image files, Philips DSDIFF and Sony DSF files to 24-bit high resolution wave files.
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, substituteAll }:
{ lib, stdenv, fetchFromGitHub, substituteAll }:
stdenv.mkDerivation rec {
pname = "srt-to-vtt-cl";
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
cp bin/$(uname -s)/$(uname -m)/srt-vtt $out/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Convert SRT files to VTT";
license = licenses.mit;
maintainers = with maintainers; [ ericdallo ];
+2 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, makeWrapper, qt4, util-linux, coreutils, which, qmake4Hook
{ lib, stdenv, fetchFromGitHub, makeWrapper, qt4, util-linux, coreutils, which, qmake4Hook
, p7zip, mtools, syslinux }:
stdenv.mkDerivation rec {
@@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = "http://unetbootin.sourceforge.net/";
description = "A tool to create bootable live USB drives from ISO images";
license = licenses.gpl2Plus;
+2 -2
View File
@@ -1,4 +1,4 @@
{ fetchurl, stdenv, libcdio, zlib, bzip2, readline, acl, attr, libiconv }:
{ fetchurl, lib, stdenv, libcdio, zlib, bzip2, readline, acl, attr, libiconv }:
stdenv.mkDerivation rec {
name = "xorriso-${version}";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libcdio zlib bzip2 readline libiconv ]
++ stdenv.lib.optionals stdenv.isLinux [ acl attr ];
meta = with stdenv.lib; {
meta = with lib; {
description = "ISO 9660 Rock Ridge file system manipulator";
longDescription =