diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index 562e3de1645b..9fde30d23ac2 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -14,10 +14,10 @@ in lib.recurseIntoAttrs convert = callPackage ./convert.nix { }; inhibit-gnome = callPackage ./inhibit-gnome.nix { }; mpris = callPackage ./mpris.nix { }; - mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { }; + mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { inherit buildLua; }; mpv-webm = callPackage ./mpv-webm.nix { }; mpvacious = callPackage ./mpvacious.nix { }; - quality-menu = callPackage ./quality-menu.nix { }; + quality-menu = callPackage ./quality-menu.nix { inherit buildLua; }; simple-mpv-webui = callPackage ./simple-mpv-webui.nix { }; sponsorblock = callPackage ./sponsorblock.nix { }; thumbfast = callPackage ./thumbfast.nix { }; diff --git a/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix b/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix index 720fdaae5b3f..8ec05a3cf691 100644 --- a/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix +++ b/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix @@ -1,6 +1,6 @@ -{ lib, stdenvNoCC, fetchFromGitHub, yt-dlp }: +{ lib, buildLua, fetchFromGitHub, yt-dlp }: -stdenvNoCC.mkDerivation rec { +buildLua rec { pname = "mpv-playlistmanager"; version = "unstable-2023-08-09"; @@ -17,21 +17,12 @@ stdenvNoCC.mkDerivation rec { 'youtube_dl_executable = "${lib.getBin yt-dlp}/bin/yt-dlp"', ''; - dontBuild = true; - - installPhase = '' - runHook preInstall - install -D -t $out/share/mpv/scripts playlistmanager.lua - runHook postInstall - ''; - - passthru.scriptName = "playlistmanager.lua"; + scriptPath = "playlistmanager.lua"; meta = with lib; { description = "Mpv lua script to create and manage playlists"; homepage = "https://github.com/jonniek/mpv-playlistmanager"; license = licenses.unlicense; - platforms = platforms.all; maintainers = with maintainers; [ lunik1 ]; }; } diff --git a/pkgs/applications/video/mpv/scripts/quality-menu.nix b/pkgs/applications/video/mpv/scripts/quality-menu.nix index 45d358843b37..d0eb2ca0119b 100644 --- a/pkgs/applications/video/mpv/scripts/quality-menu.nix +++ b/pkgs/applications/video/mpv/scripts/quality-menu.nix @@ -1,33 +1,22 @@ { lib -, stdenvNoCC +, buildLua , fetchFromGitHub , oscSupport ? false }: -stdenvNoCC.mkDerivation rec { +buildLua rec { pname = "mpv-quality-menu"; - version = "4.1.0"; + version = "4.1.1"; src = fetchFromGitHub { owner = "christoph-heinrich"; repo = "mpv-quality-menu"; rev = "v${version}"; - hash = "sha256-93WoTeX61xzbjx/tgBgUVuwyR9MkAUzCfVSrbAC7Ddc="; + hash = "sha256-yrcTxqpLnOI1Tq3khhflO3wzhyeTPuvKifyH5/P57Ns="; }; - dontBuild = true; - - installPhase = '' - runHook preInstall - mkdir -p $out/share/mpv/scripts - cp quality-menu.lua $out/share/mpv/scripts - '' + lib.optionalString oscSupport '' - cp quality-menu-osc.lua $out/share/mpv/scripts - '' + '' - runHook postInstall - ''; - passthru.scriptName = "quality-menu.lua"; + scriptPath = if oscSupport then "*.lua" else passthru.scriptName; meta = with lib; { description = "A userscript for MPV that allows you to change youtube video quality (ytdl-format) on the fly";