kdePackages.mkKdeDerivation: pass pos explicitly instead of as part of meta

Makes both meta.broken and nix edit work correctly.
This commit is contained in:
K900 2024-03-21 20:54:24 +03:00
parent 783b241f94
commit 7664d1b698

View file

@ -112,16 +112,15 @@ in
"meta" "meta"
]; ];
meta = let meta = {
pos = builtins.unsafeGetAttrPos "pname" args;
in {
description = projectInfo.${pname}.description; description = projectInfo.${pname}.description;
homepage = "https://invent.kde.org/${projectInfo.${pname}.repo_path}"; homepage = "https://invent.kde.org/${projectInfo.${pname}.repo_path}";
license = lib.filter (l: l != null) (map (l: licensesBySpdxId.${l}) licenseInfo.${pname}); license = lib.filter (l: l != null) (map (l: licensesBySpdxId.${l}) licenseInfo.${pname});
maintainers = lib.teams.qt-kde.members; maintainers = lib.teams.qt-kde.members;
# Platforms are currently limited to what upstream tests in CI, but can be extended if there's interest. # Platforms are currently limited to what upstream tests in CI, but can be extended if there's interest.
platforms = lib.platforms.linux ++ lib.platforms.freebsd; platforms = lib.platforms.linux ++ lib.platforms.freebsd;
position = "${pos.file}:${toString pos.line}";
} // (args.meta or { }); } // (args.meta or { });
pos = builtins.unsafeGetAttrPos "pname" args;
in in
stdenv.mkDerivation (defaultArgs // cleanArgs // { inherit meta; }) stdenv.mkDerivation (defaultArgs // cleanArgs // { inherit meta pos; })