Commit e2596ac2 authored by nicoo's avatar nicoo
Browse files

mpvScripts.buildLua: add a `runtime-dependencies` option

parent 270903c3
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ lib.makeOverridable (
      {
        pname,
        extraScripts ? [ ],
        runtime-dependencies ? [ ],
        ...
      }@args:
      let
@@ -75,8 +76,19 @@ lib.makeOverridable (
          runHook postInstall
        '';

        passthru = {
        passthru =
          {
            inherit scriptName;
          }
          // lib.optionalAttrs (runtime-dependencies != [ ]) {
            extraWrapperArgs =
              [
                "--prefix"
                "PATH"
                ":"
              ]
              ++ (map lib.makeBinPath runtime-dependencies)
              ++ args.passthru.extraWrapperArgs or [ ];
          };
        meta =
          {