From 4b07cce3aef4cd8282bfb8d8720ee63165ce0383 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 25 Jan 2024 07:59:00 +0100 Subject: [PATCH] print maintainers list --- nix_update/__init__.py | 8 ++++++++ nix_update/eval.py | 2 ++ 2 files changed, 10 insertions(+) diff --git a/nix_update/__init__.py b/nix_update/__init__.py index 5ee1947..32cfaaf 100644 --- a/nix_update/__init__.py +++ b/nix_update/__init__.py @@ -290,6 +290,14 @@ def main(args: list[str] = sys.argv[1:]) -> None: package = update(options) + if package.maintainers: + print("Package maintainers:") + for maintainer in package.maintainers: + print( + f" - {maintainer['name']}" + + (f" (@{maintainer['github']})" if "github" in maintainer else "") + ) + if options.build: nix_build(options) diff --git a/nix_update/eval.py b/nix_update/eval.py index e018dd5..bb65cc1 100644 --- a/nix_update/eval.py +++ b/nix_update/eval.py @@ -47,6 +47,7 @@ class Package: url: str | None src_homepage: str | None changelog: str | None + maintainers: list[dict[str, str]] | None rev: str hash: str | None go_modules: str | None @@ -165,6 +166,7 @@ def eval_expression( has_update_script = {has_update_script}; src_homepage = pkg.src.meta.homepage or null; changelog = pkg.meta.changelog or null; + maintainers = pkg.meta.maintainers or null; }}"""