about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv/scripts/buildLua.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video/mpv/scripts/buildLua.nix')
-rw-r--r--pkgs/applications/video/mpv/scripts/buildLua.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/applications/video/mpv/scripts/buildLua.nix b/pkgs/applications/video/mpv/scripts/buildLua.nix
index 0027fa722596..e0afa7d932c6 100644
--- a/pkgs/applications/video/mpv/scripts/buildLua.nix
+++ b/pkgs/applications/video/mpv/scripts/buildLua.nix
@@ -64,6 +64,17 @@ lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy
     '';
 
     passthru = { inherit scriptName; };
-    meta.platforms = lib.platforms.all;
+    meta = {
+      platforms = lib.platforms.all;
+    } // (
+      let pos =
+        if (args.meta or {}) ? description then
+          builtins.unsafeGetAttrPos "description" args.meta
+        else
+          builtins.unsafeGetAttrPos "pname" args;
+      in lib.optionalAttrs
+        (pos != null)
+        { position = "${pos.file}:${toString pos.line}"; }
+    );
   })
 ))