tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
mpvScripts.quality-menu: Refactor with `buildLua`
nicoo
2 years ago
7189efcb
22e859ae
+4
-15
2 changed files
expand all
collapse all
unified
split
pkgs
applications
video
mpv
scripts
default.nix
quality-menu.nix
+1
-1
pkgs/applications/video/mpv/scripts/default.nix
···
17
17
mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
18
18
mpv-webm = callPackage ./mpv-webm.nix { };
19
19
mpvacious = callPackage ./mpvacious.nix { };
20
20
-
quality-menu = callPackage ./quality-menu.nix { };
20
20
+
quality-menu = callPackage ./quality-menu.nix { inherit buildLua; };
21
21
simple-mpv-webui = callPackage ./simple-mpv-webui.nix { };
22
22
sponsorblock = callPackage ./sponsorblock.nix { };
23
23
thumbfast = callPackage ./thumbfast.nix { };
+3
-14
pkgs/applications/video/mpv/scripts/quality-menu.nix
···
1
1
{ lib
2
2
-
, stdenvNoCC
2
2
+
, buildLua
3
3
, fetchFromGitHub
4
4
, oscSupport ? false
5
5
}:
6
6
7
7
-
stdenvNoCC.mkDerivation rec {
7
7
+
buildLua rec {
8
8
pname = "mpv-quality-menu";
9
9
version = "4.1.0";
10
10
···
15
15
hash = "sha256-93WoTeX61xzbjx/tgBgUVuwyR9MkAUzCfVSrbAC7Ddc=";
16
16
};
17
17
18
18
-
dontBuild = true;
19
19
-
20
20
-
installPhase = ''
21
21
-
runHook preInstall
22
22
-
mkdir -p $out/share/mpv/scripts
23
23
-
cp quality-menu.lua $out/share/mpv/scripts
24
24
-
'' + lib.optionalString oscSupport ''
25
25
-
cp quality-menu-osc.lua $out/share/mpv/scripts
26
26
-
'' + ''
27
27
-
runHook postInstall
28
28
-
'';
29
29
-
30
18
passthru.scriptName = "quality-menu.lua";
19
19
+
scriptPath = if oscSupport then "*.lua" else passthru.scriptName;
31
20
32
21
meta = with lib; {
33
22
description = "A userscript for MPV that allows you to change youtube video quality (ytdl-format) on the fly";