mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
mpvScripts.buildLua: Expose meta.position
Undocumented in the nixpkgs manual, but apparently needed for `common-updaters` and related tools such as `nix-update`.
This commit is contained in:
parent
eab72db9b0
commit
b3b5d76be3
@ -56,6 +56,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}"; }
|
||||
);
|
||||
})
|
||||
))
|
||||
|
Loading…
Reference in New Issue
Block a user