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
@@ -47,7 +47,7 @@ buildPythonApplication rec {
> $out/etc/udev/rules.d/60-cm-rgb.rules
'';
meta = with lib; {
meta = {
description = "Control AMD Wraith Prism RGB LEDs";
longDescription = ''
cm-rgb controls AMD Wraith Prism RGB LEDS.
@@ -57,8 +57,8 @@ buildPythonApplication rec {
in <filename>configuration.nix</filename>.
'';
homepage = "https://github.com/gfduszynski/cm-rgb";
license = licenses.mit;
platforms = platforms.all;
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = [ ];
};
}
+4 -4
View File
@@ -144,15 +144,15 @@ stdenv.mkDerivation rec {
$makeWrapperArgs
'';
meta = with lib; {
meta = {
description = "Probe for hardware, check operability and find drivers";
homepage = "https://github.com/linuxhw/hw-probe";
platforms = with platforms; (linux ++ freebsd ++ netbsd ++ openbsd);
license = with licenses; [
platforms = with lib.platforms; (linux ++ freebsd ++ netbsd ++ openbsd);
license = with lib.licenses; [
lgpl21
bsdOriginal
];
maintainers = with maintainers; [ rehno-lindeque ];
maintainers = with lib.maintainers; [ rehno-lindeque ];
mainProgram = "hw-probe";
};
}
+4 -4
View File
@@ -49,16 +49,16 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = with lib; {
meta = {
homepage = "https://chromium.googlesource.com/chromiumos/platform/minijail/+/refs/heads/main/README.md";
description = "Sandboxing library and application using Linux namespaces and capabilities";
changelog = "https://chromium.googlesource.com/chromiumos/platform/minijail/+/refs/tags/linux-v${version}";
license = licenses.bsd3;
maintainers = with maintainers; [
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
pcarrier
qyliss
];
platforms = platforms.linux;
platforms = lib.platforms.linux;
mainProgram = "minijail0";
};
}
+2 -2
View File
@@ -38,10 +38,10 @@ buildPythonApplication {
cp -v constants.json $out/share/constants.json
'';
meta = with lib; {
meta = {
homepage = "https://android.googlesource.com/platform/external/minijail/+/refs/heads/master/tools/";
description = "Set of tools for minijail";
license = licenses.asl20;
license = lib.licenses.asl20;
inherit (minijail.meta) maintainers platforms;
};
}
+3 -3
View File
@@ -339,10 +339,10 @@ stdenv.mkDerivation (
description = "Real-time performance monitoring tool";
homepage = "https://www.netdata.cloud/";
changelog = "https://github.com/netdata/netdata/releases/tag/v${version}";
license = [ licenses.gpl3Plus ] ++ lib.optionals withCloudUi [ licenses.ncul1 ];
license = [ lib.licenses.gpl3Plus ] ++ lib.optionals withCloudUi [ lib.licenses.ncul1 ];
mainProgram = "netdata";
platforms = platforms.unix;
maintainers = with maintainers; [
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
mkg20001
rhoriguchi
];
+4 -4
View File
@@ -98,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: {
};
};
meta = with lib; {
meta = {
description = "htop-like task monitor for AMD, Adreno, Intel and NVIDIA GPUs";
longDescription = ''
Nvtop stands for Neat Videocard TOP, a (h)top like task monitor for AMD, Adreno, Intel and NVIDIA GPUs.
@@ -106,9 +106,9 @@ stdenv.mkDerivation (finalAttrs: {
'';
homepage = "https://github.com/Syllo/nvtop";
changelog = "https://github.com/Syllo/nvtop/releases/tag/${finalAttrs.version}";
license = licenses.gpl3Only;
platforms = if apple then platforms.darwin else platforms.linux;
maintainers = with maintainers; [
license = lib.licenses.gpl3Only;
platforms = if apple then lib.platforms.darwin else lib.platforms.linux;
maintainers = with lib.maintainers; [
gbtb
anthonyroussel
moni
+4 -4
View File
@@ -125,15 +125,15 @@ stdenv.mkDerivation rec {
./test
'';
meta = with lib; {
meta = {
homepage = "https://9fans.github.io/plan9port/";
description = "Plan 9 from User Space";
longDescription = ''
Plan 9 from User Space (aka plan9port) is a port of many Plan 9 programs
from their native Plan 9 environment to Unix-like operating systems.
'';
license = licenses.mit;
maintainers = with maintainers; [
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
bbarker
ftrvxmtrx
kovirobi
@@ -141,7 +141,7 @@ stdenv.mkDerivation rec {
ylh
];
mainProgram = "9";
platforms = platforms.unix;
platforms = lib.platforms.unix;
};
}
# TODO: investigate the mouse chording support patch