treewide: clean up 'meta = with' pattern

This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
This commit is contained in:
Ihar Hrachyshka
2025-12-10 18:09:49 +01:00
committed by Wolfgang Walther
co-authored by Wolfgang Walther
parent 8bbc115374
commit 567e8dfd8e
16759 changed files with 54499 additions and 54491 deletions
+3 -3
View File
@@ -44,11 +44,11 @@ stdenv.mkDerivation (finalAttrs: {
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
meta = {
description = "High-quality data compression program";
license = licenses.bsdOriginal;
license = lib.licenses.bsdOriginal;
pkgConfigModules = [ "bz2" ];
platforms = platforms.all;
platforms = lib.platforms.all;
maintainers = [ ];
};
})
+4 -4
View File
@@ -71,14 +71,14 @@ stdenv.mkDerivation (
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
meta = {
description = "High-quality data compression program";
homepage = "https://www.sourceware.org/bzip2";
changelog = "https://sourceware.org/git/?p=bzip2.git;a=blob;f=CHANGES;hb=HEAD";
license = licenses.bsdOriginal;
license = lib.licenses.bsdOriginal;
pkgConfigModules = [ "bzip2" ];
platforms = platforms.all;
maintainers = with maintainers; [ mic92 ];
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ mic92 ];
};
}
)
+3 -3
View File
@@ -21,10 +21,10 @@ stdenv.mkDerivation rec {
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 $out/bin/zipmix
'';
meta = with lib; {
meta = {
description = "Tool that aggressively optimizes the sizes of Zip archives";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
homepage = "http://advsys.net/ken/utils.htm";
};
}
+3 -3
View File
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
install -D -m644 xdelta3.1 $out/share/man/man1/xdelta3.1
'';
meta = with lib; {
meta = {
description = "Binary differential compression in VCDIFF (RFC 3284) format";
longDescription = ''
xdelta is a command line program for delta encoding, which generates two
@@ -62,8 +62,8 @@ stdenv.mkDerivation rec {
for binary files and does not generate human readable output.
'';
homepage = "http://xdelta.org/";
license = licenses.gpl2Plus;
license = lib.licenses.gpl2Plus;
mainProgram = "xdelta3";
platforms = platforms.linux;
platforms = lib.platforms.linux;
};
}
+3 -3
View File
@@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
};
};
meta = with lib; {
meta = {
changelog = "https://github.com/tukaani-project/xz/releases/tag/v${finalAttrs.version}";
description = "General-purpose data compression software, successor of LZMA";
homepage = "https://tukaani.org/xz/";
@@ -94,11 +94,11 @@ stdenv.mkDerivation (finalAttrs: {
create 30 % smaller output than gzip and 15 % smaller output than
bzip2.
'';
license = with licenses; [
license = with lib.licenses; [
gpl2Plus
lgpl21Plus
];
platforms = platforms.all;
platforms = lib.platforms.all;
pkgConfigModules = [ "liblzma" ];
};
})
+3 -3
View File
@@ -137,7 +137,7 @@ stdenv.mkDerivation (finalAttrs: {
};
};
meta = with lib; {
meta = {
description = "Zstandard real-time compression algorithm";
longDescription = ''
Zstd, short for Zstandard, is a fast lossless compression algorithm,
@@ -150,9 +150,9 @@ stdenv.mkDerivation (finalAttrs: {
'';
homepage = "https://facebook.github.io/zstd/";
changelog = "https://github.com/facebook/zstd/blob/v${finalAttrs.version}/CHANGELOG";
license = with licenses; [ bsd3 ]; # Or, at your opinion, GPL-2.0-only.
license = with lib.licenses; [ bsd3 ]; # Or, at your opinion, GPL-2.0-only.
mainProgram = "zstd";
platforms = platforms.all;
platforms = lib.platforms.all;
maintainers = [ ];
pkgConfigModules = [ "libzstd" ];
};