Commit 492f6628 authored by nicoo's avatar nicoo
Browse files

mpvScripts.uosc: refactor with `buildLua`

parent ce2dcc6d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ in lib.recurseIntoAttrs
    sponsorblock = callPackage ./sponsorblock.nix { };
    thumbfast = callPackage ./thumbfast.nix { inherit buildLua; };
    thumbnail = callPackage ./thumbnail.nix { inherit buildLua; };
    uosc = callPackage ./uosc.nix { };
    uosc = callPackage ./uosc.nix { inherit buildLua; };
    visualizer = callPackage ./visualizer.nix { };
    vr-reversal = callPackage ./vr-reversal.nix { };
    webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { };
+5 −12
Original line number Diff line number Diff line
{ stdenvNoCC, lib, fetchFromGitHub, makeFontsConf }:
{ buildLua, lib, fetchFromGitHub, makeFontsConf }:

stdenvNoCC.mkDerivation (finalAttrs: {
buildLua (finalAttrs: {
  pname = "uosc";
  version = "4.7.0";

@@ -16,19 +16,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
      --replace "mp.find_config_file('scripts')" "\"$out/share/mpv/scripts\""
  '';

  dontBuild = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/mpv/
    cp -r scripts $out/share/mpv
  scriptPath = "scripts/uosc.lua";
  postInstall = ''
    cp -r scripts/uosc_shared $out/share/mpv/
    cp -r fonts $out/share

    runHook postInstall
  '';

  passthru.scriptName = "uosc.lua";
  # the script uses custom "texture" fonts as the background for ui elements.
  # In order for mpv to find them, we need to adjust the fontconfig search path.
  passthru.extraWrapperArgs = [