about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2024-02-29 19:33:23 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2024-02-29 21:38:46 +0100
commit32740242f3375ca62af92aa6598868f756cfcbea (patch)
tree13187b2fe336128d9f38dbbf63ec0968b077fbb4
parent5250ee5c0b7086edd435843ae6c3ce537ba44fde (diff)
plasma6: fix meta.position
Fixes nix edit kdePackages.plasma-browser-integration
-rw-r--r--pkgs/kde/lib/mk-kde-derivation.nix27
1 files changed, 13 insertions, 14 deletions
diff --git a/pkgs/kde/lib/mk-kde-derivation.nix b/pkgs/kde/lib/mk-kde-derivation.nix
index ddada8fb77f0d..80508eebb7d4d 100644
--- a/pkgs/kde/lib/mk-kde-derivation.nix
+++ b/pkgs/kde/lib/mk-kde-derivation.nix
@@ -78,7 +78,6 @@ in
     extraNativeBuildInputs ? [],
     extraPropagatedBuildInputs ? [],
     extraCmakeFlags ? [],
-    meta ? {},
     ...
   } @ args: let
     # FIXME(later): this is wrong for cross, some of these things really need to go into nativeBuildInputs,
@@ -101,18 +100,6 @@ in
       cmakeFlags = ["-DQT_MAJOR_VERSION=6"] ++ extraCmakeFlags;
 
       separateDebugInfo = true;
-
-      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;
-        }
-        // meta;
     };
 
     cleanArgs = builtins.removeAttrs args [
@@ -122,5 +109,17 @@ in
       "extraCmakeFlags"
       "meta"
     ];
+
+    meta = let
+      pos = builtins.unsafeGetAttrPos "pname" args;
+    in {
+      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 { });
   in
-    stdenv.mkDerivation (defaultArgs // cleanArgs)
+    stdenv.mkDerivation (defaultArgs // cleanArgs) // { inherit meta; }