From 1376730c663089c3f62071fd666f61362da183e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 4 Nov 2025 21:48:57 +0100 Subject: [PATCH] akkuPackages: do not define meta.{description,homepage} to empty strings --- .../tools/package-management/akku/default.nix | 98 ++++++++++--------- 1 file changed, 52 insertions(+), 46 deletions(-) diff --git a/pkgs/tools/package-management/akku/default.nix b/pkgs/tools/package-management/akku/default.nix index 882db169d2bf..724d1dfd92a9 100644 --- a/pkgs/tools/package-management/akku/default.nix +++ b/pkgs/tools/package-management/akku/default.nix @@ -20,8 +20,8 @@ lib.makeScope newScope (self: rec { url, sha256, source, - synopsis ? "", - homepage ? "", + synopsis ? null, + homepage ? null, ... }: (akkuDerivation { @@ -35,50 +35,56 @@ lib.makeScope newScope (self: rec { nativeBuildInputs = map (x: akkuself.${x}) dev-dependencies; unpackPhase = "tar xf $src"; - meta.homepage = homepage; - meta.description = synopsis; - meta.license = - let - stringToLicense = - s: - ( - lib.licenses - // (with lib.licenses; { - "0bsd" = bsd0; - "agpl" = agpl3Only; - "apache-2.0" = asl20; - "artistic" = artistic2; - "bsd" = bsd3; - "bsd-1-clause" = bsd1; - "bsd-2-clause" = bsd2; - "bsd-3-clause" = bsd3; - "cc0-1.0" = cc0; - "gpl" = gpl3Only; - "gpl-2" = gpl2Only; - "gpl-2.0-or-later" = gpl2Plus; - "gplv2" = gpl2Only; - "gpl-3" = gpl3Only; - "gpl-3.0" = gpl3Only; - "gpl-3.0-or-later" = gpl3Plus; - "gplv3" = gpl3Only; - "lgpl" = lgpl3Only; - "lgpl-2" = lgpl2Only; - "lgpl-2.0+" = lgpl2Plus; - "lgpl-2.1" = lgpl21Only; - "lgpl-2.1-or-later" = lgpl21Plus; - "lgpl-3.0-or-later" = lgpl3Plus; - "lgpl-3" = lgpl3Only; - "lgplv3" = lgpl3Only; - "public-domain" = publicDomain; - "srfi" = bsd3; - "unicode" = ucd; - "xerox" = xerox; - "zlib-acknowledgement" = zlib; - "noassertion" = free; - }) - ).${s} or s; - in - if builtins.isList license then map stringToLicense license else stringToLicense license; + meta = { + license = + let + stringToLicense = + s: + ( + lib.licenses + // (with lib.licenses; { + "0bsd" = bsd0; + "agpl" = agpl3Only; + "apache-2.0" = asl20; + "artistic" = artistic2; + "bsd" = bsd3; + "bsd-1-clause" = bsd1; + "bsd-2-clause" = bsd2; + "bsd-3-clause" = bsd3; + "cc0-1.0" = cc0; + "gpl" = gpl3Only; + "gpl-2" = gpl2Only; + "gpl-2.0-or-later" = gpl2Plus; + "gplv2" = gpl2Only; + "gpl-3" = gpl3Only; + "gpl-3.0" = gpl3Only; + "gpl-3.0-or-later" = gpl3Plus; + "gplv3" = gpl3Only; + "lgpl" = lgpl3Only; + "lgpl-2" = lgpl2Only; + "lgpl-2.0+" = lgpl2Plus; + "lgpl-2.1" = lgpl21Only; + "lgpl-2.1-or-later" = lgpl21Plus; + "lgpl-3.0-or-later" = lgpl3Plus; + "lgpl-3" = lgpl3Only; + "lgplv3" = lgpl3Only; + "public-domain" = publicDomain; + "srfi" = bsd3; + "unicode" = ucd; + "xerox" = xerox; + "zlib-acknowledgement" = zlib; + "noassertion" = free; + }) + ).${s} or s; + in + if builtins.isList license then map stringToLicense license else stringToLicense license; + } + // lib.optionalAttrs (homepage != null) { + inherit homepage; + } + // lib.optionalAttrs (synopsis != null) { + description = synopsis; + }; }).overrideAttrs ({ "${pname}" = lib.id; } // overrides)."${pname}"; deps = lib.importTOML ./deps.toml;