diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix index 0027fa722596..e0afa7d932c6 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix +++ b/nixpkgs/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}"; } + ); }) )) |