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:
co-authored by
Wolfgang Walther
parent
8bbc115374
commit
567e8dfd8e
@@ -33,10 +33,10 @@ buildPythonPackage rec {
|
||||
# Instead, we do this as a passthru.tests test.
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Python attributes without boilerplate";
|
||||
homepage = "https://github.com/hynek/attrs";
|
||||
license = licenses.mit;
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ buildPythonPackage rec {
|
||||
export LC_ALL=${if stdenv.hostPlatform.isDarwin then "en_US" else "C"}.UTF-8
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Updated configparser from Python 3.7 for Python 2.6+";
|
||||
license = licenses.mit;
|
||||
license = lib.licenses.mit;
|
||||
homepage = "https://github.com/jaraco/configparser";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ buildPythonPackage rec {
|
||||
|
||||
doCheck = !isPyPy;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://pypi.python.org/pypi/enum/";
|
||||
description = "Robust enumerated type support in Python";
|
||||
license = licenses.gpl2;
|
||||
license = lib.licenses.gpl2;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ buildPythonPackage rec {
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/benediktschmitt/py-filelock";
|
||||
description = "Platform independent file lock for Python";
|
||||
license = licenses.unlicense;
|
||||
maintainers = with maintainers; [ henkkalkwater ];
|
||||
license = lib.licenses.unlicense;
|
||||
maintainers = with lib.maintainers; [ henkkalkwater ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@ buildPythonPackage rec {
|
||||
|
||||
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Backport of the concurrent.futures package from Python 3.2";
|
||||
homepage = "https://github.com/agronholm/pythonfutures";
|
||||
license = licenses.bsd2;
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,9 +53,9 @@ buildPythonPackage rec {
|
||||
py.test tests/cover
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Python library for property based testing";
|
||||
homepage = "https://github.com/HypothesisWorks/hypothesis";
|
||||
license = licenses.mpl20;
|
||||
license = lib.licenses.mpl20;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,9 +37,9 @@ buildPythonPackage rec {
|
||||
|
||||
pythonImportsCheck = [ "importlib_metadata" ];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Read metadata from Python packages";
|
||||
homepage = "https://importlib-metadata.readthedocs.io/";
|
||||
license = licenses.asl20;
|
||||
license = lib.licenses.asl20;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,15 +34,15 @@ buildPythonPackage rec {
|
||||
pytest -v tests -W ignore::DeprecationWarning
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "http://jinja.pocoo.org/";
|
||||
description = "Stand-alone template engine";
|
||||
license = licenses.bsd3;
|
||||
license = lib.licenses.bsd3;
|
||||
longDescription = ''
|
||||
Jinja2 is a template engine written in pure Python. It provides a
|
||||
Django inspired non-XML syntax but supports inline expressions and
|
||||
an optional sandboxed environment.
|
||||
'';
|
||||
maintainers = with maintainers; [ pierron ];
|
||||
maintainers = with lib.maintainers; [ pierron ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ buildPythonPackage rec {
|
||||
sha256 = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Implements a XML/HTML/XHTML Markup safe string";
|
||||
homepage = "http://dev.pocoo.org";
|
||||
license = licenses.bsd3;
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ buildPythonPackage rec {
|
||||
pytest
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Mock objects for Python";
|
||||
homepage = "http://python-mock.sourceforge.net/";
|
||||
license = licenses.bsd2;
|
||||
license = lib.licenses.bsd2;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -34,13 +34,13 @@ buildPythonPackage rec {
|
||||
# Prevent circular dependency
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Core utilities for Python packages";
|
||||
homepage = "https://github.com/pypa/packaging";
|
||||
license = [
|
||||
licenses.bsd2
|
||||
licenses.asl20
|
||||
lib.licenses.bsd2
|
||||
lib.licenses.asl20
|
||||
];
|
||||
maintainers = with maintainers; [ bennofs ];
|
||||
maintainers = with lib.maintainers; [ bennofs ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -54,10 +54,10 @@ buildPythonPackage rec {
|
||||
"-Dpython=${python.pythonOnBuildForHost.interpreter}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Python 2 bindings for cairo";
|
||||
homepage = "https://pycairo.readthedocs.io/";
|
||||
license = with licenses; [
|
||||
license = with lib.licenses; [
|
||||
lgpl21Only
|
||||
mpl11
|
||||
];
|
||||
|
||||
@@ -53,10 +53,10 @@ buildPythonPackage rec {
|
||||
chmod a-x $out/share/pygobject/*/codegen/*.py
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://pygobject.readthedocs.io/";
|
||||
description = "Python bindings for GLib";
|
||||
license = licenses.gpl2;
|
||||
license = lib.licenses.gpl2;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -89,11 +89,11 @@ buildPythonPackage rec {
|
||||
$out/${python.sitePackages}/${pname}-${version}.pth
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "GTK 2 Python bindings";
|
||||
homepage = "https://gitlab.gnome.org/Archive/pygtk";
|
||||
platforms = platforms.all;
|
||||
license = with licenses; [ lgpl21Plus ];
|
||||
platforms = lib.platforms.all;
|
||||
license = with lib.licenses; [ lgpl21Plus ];
|
||||
maintainers = with lib.maintainers; [ bryango ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ let
|
||||
});
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/pyparsing/pyparsing";
|
||||
description = "Alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions";
|
||||
license = licenses.mit;
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
@@ -50,10 +50,10 @@ buildPythonPackage rec {
|
||||
and not test_rsyncignore"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "py.test xdist plugin for distributed testing and loop-on-failing modes";
|
||||
homepage = "https://github.com/pytest-dev/pytest-xdist";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -91,14 +91,14 @@ buildPythonPackage rec {
|
||||
appendToVar preDistPhases pytestRemoveBytecodePhase
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://docs.pytest.org";
|
||||
description = "Framework for writing tests";
|
||||
maintainers = with maintainers; [
|
||||
maintainers = with lib.maintainers; [
|
||||
lovek323
|
||||
madjar
|
||||
];
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ buildPythonPackage rec {
|
||||
|
||||
checkPhase = "${python.interpreter} test/run_tests.py";
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Better directory iterator and faster os.walk()";
|
||||
homepage = "https://github.com/benhoyt/scandir";
|
||||
license = licenses.gpl3;
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ buildPythonPackage rec {
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "setuptools_scm" ];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/pypa/setuptools_scm/";
|
||||
description = "Handles managing your python package versions in scm metadata";
|
||||
license = licenses.mit;
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -75,10 +75,10 @@ buildPythonPackage {
|
||||
# Requires pytest, causing infinite recursion.
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Utilities to facilitate the installation of Python packages";
|
||||
homepage = "https://pypi.python.org/pypi/setuptools";
|
||||
license = with licenses; [
|
||||
license = with lib.licenses; [
|
||||
psfl
|
||||
zpl20
|
||||
];
|
||||
|
||||
@@ -37,9 +37,9 @@ buildPythonPackage rec {
|
||||
testDir
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Backport of typing module to Python versions older than 3.5";
|
||||
homepage = "https://docs.python.org/3/library/typing.html";
|
||||
license = licenses.psfl;
|
||||
license = lib.licenses.psfl;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ buildPythonPackage rec {
|
||||
# We add this flag to ignore the copy installed by bootstrapped-pip
|
||||
pipInstallFlags = [ "--ignore-installed" ];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/pypa/wheel";
|
||||
description = "Built-package format for Python";
|
||||
longDescription = ''
|
||||
@@ -52,7 +52,7 @@ buildPythonPackage rec {
|
||||
It should be noted that wheel is not intended to be used as a library,
|
||||
and as such there is no stable, public API.
|
||||
'';
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ siriobalmelli ];
|
||||
license = with lib.licenses; [ mit ];
|
||||
maintainers = with lib.maintainers; [ siriobalmelli ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,9 +34,9 @@ buildPythonPackage rec {
|
||||
# Prevent infinite recursion with pytest
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Pathlib-compatible object wrapper for zip files";
|
||||
homepage = "https://github.com/jaraco/zipp";
|
||||
license = licenses.mit;
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user