Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions pkgs/kde/lib/mk-kde-derivation.nix
Expand Up @@ -112,16 +112,15 @@ in
"meta"
];

meta = let
pos = builtins.unsafeGetAttrPos "pname" args;
in {
meta = {
description = projectInfo.${pname}.description;
homepage = "https://invent.kde.org/${projectInfo.${pname}.repo_path}";
license = lib.filter (l: l != null) (map (l: licensesBySpdxId.${l}) licenseInfo.${pname});
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 = lib.platforms.linux ++ lib.platforms.freebsd;
position = "${pos.file}:${toString pos.line}";
} // (args.meta or { });

pos = builtins.unsafeGetAttrPos "pname" args;
in
stdenv.mkDerivation (defaultArgs // cleanArgs // { inherit meta; })
stdenv.mkDerivation (defaultArgs // cleanArgs // { inherit meta pos; })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know that you could put pos here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me neither, but I looked at the sources for mkDerivation and turns out you can.