tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
mpvScripts: format according to RFC166 rules
nicoo
2 years ago
a6f88138
294953dd
+530
-371
33 changed files
expand all
collapse all
unified
split
pkgs
applications
video
mpv
scripts
buildLua.nix
chapterskip.nix
convert.nix
cutter.nix
default.nix
dynamic-crop.nix
inhibit-gnome.nix
memo.nix
modernx-zydezu.nix
modernx.nix
mpris.nix
mpv-cheatsheet.nix
mpv-notify-send.nix
mpv-osc-modern.nix
mpv-playlistmanager.nix
mpv-webm.nix
mpv.nix
mpvacious.nix
occivink.nix
quack.nix
quality-menu.nix
reload.nix
simple-mpv-webui.nix
sponsorblock-minimal.nix
sponsorblock.nix
thumbfast.nix
thumbnail.nix
uosc.nix
videoclip.nix
visualizer.nix
vr-reversal.nix
webtorrent-mpv-hook.nix
youtube-upnext.nix
+81
-66
pkgs/applications/video/mpv/scripts/buildLua.nix
···
1
-
{ lib
2
-
, stdenvNoCC }:
3
4
let
5
# Escape strings for embedding in shell scripts
···
10
scriptsDir = "$out/share/mpv/scripts";
11
12
# similar to `lib.extends`, but with inverted precedence and recursive update
13
-
extendedBy = args: orig: self:
14
-
let super = args self;
15
-
in lib.recursiveUpdate (orig super) super
16
-
;
0
0
17
in
18
19
-
lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy
20
-
(if lib.isFunction args then args else (_: args)) (
21
-
{ pname
22
-
, extraScripts ? []
23
-
, ... }@args:
24
-
let
25
-
strippedName = with builtins;
26
-
let groups = match "mpv[-_](.*)" pname; in
27
-
if groups != null
28
-
then head groups
29
-
else pname
30
-
;
31
-
# either passthru.scriptName, inferred from scriptPath, or from pname
32
-
scriptName = (args.passthru or {}).scriptName or (
33
-
if args ? scriptPath
34
-
then fileName args.scriptPath
35
-
else "${strippedName}.lua"
36
-
);
37
-
scriptPath = args.scriptPath or "./${scriptName}";
38
-
in {
39
-
dontBuild = true;
40
-
preferLocalBuild = true;
0
0
0
41
42
-
# Prevent `patch` from emitting `.orig` files (that end up in the output)
43
-
patchFlags = [ "--no-backup-if-mismatch" "-p1" ];
0
0
0
44
45
-
outputHashMode = "recursive";
46
-
installPhase = ''
47
-
runHook preInstall
48
49
-
if [ -d "${scriptPath}" ]; then
50
-
[ -f "${scriptPath}/main.lua" ] || {
51
-
echo "Script directory '${scriptPath}' does not contain 'main.lua'" >&2
52
-
exit 1
53
-
}
54
-
[ ${with builtins; toString (length extraScripts)} -eq 0 ] || {
55
-
echo "mpvScripts.buildLua does not support 'extraScripts'" \
56
-
"when 'scriptPath' is a directory" >&2
57
-
exit 1
58
-
}
59
-
mkdir -p "${scriptsDir}"
60
-
cp -a "${scriptPath}" "${scriptsDir}/${scriptName}"
61
-
else
62
-
install -m644 -Dt "${scriptsDir}" ${escaped scriptPath}
63
-
${lib.optionalString (extraScripts != []) ''cp -at "${scriptsDir}/" ${escapedList extraScripts}''}
64
-
fi
0
0
65
66
-
runHook postInstall
67
-
'';
68
69
-
passthru = { inherit scriptName; };
70
-
meta = {
71
-
platforms = lib.platforms.all;
72
-
} // (
73
-
let pos =
74
-
if (args.meta or {}) ? description then
75
-
builtins.unsafeGetAttrPos "description" args.meta
76
-
else
77
-
builtins.unsafeGetAttrPos "pname" args;
78
-
in lib.optionalAttrs
79
-
(pos != null)
80
-
{ position = "${pos.file}:${toString pos.line}"; }
81
-
);
82
-
})
83
-
))
0
0
0
0
0
0
···
1
+
{ lib, stdenvNoCC }:
0
2
3
let
4
# Escape strings for embedding in shell scripts
···
9
scriptsDir = "$out/share/mpv/scripts";
10
11
# similar to `lib.extends`, but with inverted precedence and recursive update
12
+
extendedBy =
13
+
args: orig: self:
14
+
let
15
+
super = args self;
16
+
in
17
+
lib.recursiveUpdate (orig super) super;
18
in
19
20
+
lib.makeOverridable (
21
+
args:
22
+
stdenvNoCC.mkDerivation (
23
+
extendedBy (if lib.isFunction args then args else (_: args)) (
24
+
{
25
+
pname,
26
+
extraScripts ? [ ],
27
+
...
28
+
}@args:
29
+
let
30
+
strippedName =
31
+
with builtins;
32
+
let
33
+
groups = match "mpv[-_](.*)" pname;
34
+
in
35
+
if groups != null then head groups else pname;
36
+
# either passthru.scriptName, inferred from scriptPath, or from pname
37
+
scriptName =
38
+
(args.passthru or { }).scriptName
39
+
or (if args ? scriptPath then fileName args.scriptPath else "${strippedName}.lua");
40
+
scriptPath = args.scriptPath or "./${scriptName}";
41
+
in
42
+
{
43
+
dontBuild = true;
44
+
preferLocalBuild = true;
45
46
+
# Prevent `patch` from emitting `.orig` files (that end up in the output)
47
+
patchFlags = [
48
+
"--no-backup-if-mismatch"
49
+
"-p1"
50
+
];
51
52
+
outputHashMode = "recursive";
53
+
installPhase = ''
54
+
runHook preInstall
55
56
+
if [ -d "${scriptPath}" ]; then
57
+
[ -f "${scriptPath}/main.lua" ] || {
58
+
echo "Script directory '${scriptPath}' does not contain 'main.lua'" >&2
59
+
exit 1
60
+
}
61
+
[ ${with builtins; toString (length extraScripts)} -eq 0 ] || {
62
+
echo "mpvScripts.buildLua does not support 'extraScripts'" \
63
+
"when 'scriptPath' is a directory" >&2
64
+
exit 1
65
+
}
66
+
mkdir -p "${scriptsDir}"
67
+
cp -a "${scriptPath}" "${scriptsDir}/${scriptName}"
68
+
else
69
+
install -m644 -Dt "${scriptsDir}" ${escaped scriptPath}
70
+
${
71
+
lib.optionalString (extraScripts != [ ]) ''cp -at "${scriptsDir}/" ${escapedList extraScripts}''
72
+
}
73
+
fi
74
75
+
runHook postInstall
76
+
'';
77
78
+
passthru = {
79
+
inherit scriptName;
80
+
};
81
+
meta =
82
+
{
83
+
platforms = lib.platforms.all;
84
+
}
85
+
// (
86
+
let
87
+
pos =
88
+
if (args.meta or { }) ? description then
89
+
builtins.unsafeGetAttrPos "description" args.meta
90
+
else
91
+
builtins.unsafeGetAttrPos "pname" args;
92
+
in
93
+
lib.optionalAttrs (pos != null) { position = "${pos.file}:${toString pos.line}"; }
94
+
);
95
+
}
96
+
)
97
+
)
98
+
)
+13
-11
pkgs/applications/video/mpv/scripts/chapterskip.nix
···
1
-
{ lib
2
-
, fetchFromGitHub
3
-
, unstableGitUpdater
4
-
, buildLua }:
0
0
5
6
buildLua {
7
pname = "chapterskip";
···
9
version = "0-unstable-2022-09-08";
10
src = fetchFromGitHub {
11
owner = "po5";
12
-
repo = "chapterskip";
13
-
rev = "b26825316e3329882206ae78dc903ebc4613f039";
14
-
hash = "sha256-OTrLQE3rYvPQamEX23D6HttNjx3vafWdTMxTiWpDy90=";
15
};
16
-
passthru.updateScript = unstableGitUpdater {};
17
18
meta = {
19
description = "Automatically skips chapters based on title";
20
longDescription = ''
21
-
MPV script that skips chapters based on their title, categorized using regexes.
22
-
The set of skipped categories can be configured globally, or by an auto-profile.
23
'';
24
homepage = "https://github.com/po5/chapterskip";
25
-
license = lib.licenses.unfree; # https://github.com/po5/chapterskip/issues/10
26
maintainers = with lib.maintainers; [ nicoo ];
27
};
28
}
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
unstableGitUpdater,
5
+
buildLua,
6
+
}:
7
8
buildLua {
9
pname = "chapterskip";
···
11
version = "0-unstable-2022-09-08";
12
src = fetchFromGitHub {
13
owner = "po5";
14
+
repo = "chapterskip";
15
+
rev = "b26825316e3329882206ae78dc903ebc4613f039";
16
+
hash = "sha256-OTrLQE3rYvPQamEX23D6HttNjx3vafWdTMxTiWpDy90=";
17
};
18
+
passthru.updateScript = unstableGitUpdater { };
19
20
meta = {
21
description = "Automatically skips chapters based on title";
22
longDescription = ''
23
+
MPV script that skips chapters based on their title, categorized using regexes.
24
+
The set of skipped categories can be configured globally, or by an auto-profile.
25
'';
26
homepage = "https://github.com/po5/chapterskip";
27
+
license = lib.licenses.unfree; # https://github.com/po5/chapterskip/issues/10
28
maintainers = with lib.maintainers; [ nicoo ];
29
};
30
}
+9
-8
pkgs/applications/video/mpv/scripts/convert.nix
···
1
-
{ lib
2
-
, fetchgit
3
-
, unstableGitUpdater
0
4
5
-
, buildLua
6
-
, libnotify
7
-
, mkvtoolnix-cli
8
-
, yad
9
}:
10
11
buildLua {
···
16
rev = "f95cee43e390e843a47e8ec9d1711a12a8cd343d";
17
sha256 = "13m7l4sy2r8jv2sfrb3vvqvnim4a9ilnv28q5drlg09v298z3mck";
18
};
19
-
passthru.updateScript = unstableGitUpdater {};
20
21
patches = [ ./convert.patch ];
22
···
1
+
{
2
+
lib,
3
+
fetchgit,
4
+
unstableGitUpdater,
5
6
+
buildLua,
7
+
libnotify,
8
+
mkvtoolnix-cli,
9
+
yad,
10
}:
11
12
buildLua {
···
17
rev = "f95cee43e390e843a47e8ec9d1711a12a8cd343d";
18
sha256 = "13m7l4sy2r8jv2sfrb3vvqvnim4a9ilnv28q5drlg09v298z3mck";
19
};
20
+
passthru.updateScript = unstableGitUpdater { };
21
22
patches = [ ./convert.patch ];
23
+8
-2
pkgs/applications/video/mpv/scripts/cutter.nix
···
1
-
{ lib, buildLua, fetchFromGitHub, makeWrapper, unstableGitUpdater }:
0
0
0
0
0
0
2
3
buildLua {
4
pname = "video-cutter";
···
10
rev = "01a0396c075d5f8bbd1de5b571e6231f8899ab65";
11
sha256 = "sha256-veoRFzUCRH8TrvR7x+WWoycpDyxqrJZ/bnp61dVc0pE=";
12
};
13
-
passthru.updateScript = unstableGitUpdater {};
14
15
nativeBuildInputs = [ makeWrapper ];
16
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
makeWrapper,
6
+
unstableGitUpdater,
7
+
}:
8
9
buildLua {
10
pname = "video-cutter";
···
16
rev = "01a0396c075d5f8bbd1de5b571e6231f8899ab65";
17
sha256 = "sha256-veoRFzUCRH8TrvR7x+WWoycpDyxqrJZ/bnp61dVc0pE=";
18
};
19
+
passthru.updateScript = unstableGitUpdater { };
20
21
nativeBuildInputs = [ makeWrapper ];
22
+126
-92
pkgs/applications/video/mpv/scripts/default.nix
···
1
-
{ lib
2
-
, config
3
-
, newScope
4
-
, runCommand
0
5
}:
6
7
let
8
-
unionOfDisjoints = lib.fold lib.attrsets.unionOfDisjoint {};
9
10
-
addTests = name: drv:
11
-
if ! lib.isDerivation drv then
0
12
drv
13
-
else let
14
-
inherit (drv) scriptName;
15
-
scriptPath = "share/mpv/scripts/${scriptName}";
16
-
fullScriptPath = "${drv}/${scriptPath}";
17
-
in drv.overrideAttrs (old: { passthru = (old.passthru or {}) // { tests = unionOfDisjoints [
18
-
(old.passthru.tests or {})
0
0
0
0
19
20
-
{
21
-
scriptName-is-valid = runCommand "mpvScripts.${name}.passthru.tests.scriptName-is-valid" {
22
-
meta.maintainers = with lib.maintainers; [ nicoo ];
23
-
preferLocalBuild = true;
24
-
} ''
25
-
if [ -e "${fullScriptPath}" ]; then
26
-
touch $out
27
-
else
28
-
echo "mpvScripts.\"${name}\" does not contain a script named \"${scriptName}\"" >&2
29
-
exit 1
30
-
fi
31
-
'';
32
-
}
0
0
0
33
34
-
# can't check whether `fullScriptPath` is a directory, in pure-evaluation mode
35
-
(with lib; optionalAttrs (! any (s: hasSuffix s drv.passthru.scriptName) [ ".js" ".lua" ".so" ]) {
36
-
single-main-in-script-dir = runCommand "mpvScripts.${name}.passthru.tests.single-main-in-script-dir" {
37
-
meta.maintainers = with lib.maintainers; [ nicoo ];
38
-
preferLocalBuild = true;
39
-
} ''
40
-
die() {
41
-
echo "$@" >&2
42
-
exit 1
43
-
}
0
0
0
0
0
0
0
0
0
0
0
0
0
44
45
-
cd "${drv}/${scriptPath}" # so the glob expands to filenames only
46
-
mains=( main.* )
47
-
if [ "''${#mains[*]}" -eq 1 ]; then
48
-
touch $out
49
-
elif [ "''${#mains[*]}" -eq 0 ]; then
50
-
die "'${scriptPath}' contains no 'main.*' file"
51
-
else
52
-
die "'${scriptPath}' contains multiple 'main.*' files:" "''${mains[*]}"
53
-
fi
54
-
'';
55
-
})
56
-
]; }; });
0
0
0
57
58
-
scope = self: let
59
-
inherit (self) callPackage;
60
-
in lib.mapAttrs addTests {
61
-
inherit (callPackage ./mpv.nix { })
62
-
acompressor autocrop autodeint autoload;
63
-
inherit (callPackage ./occivink.nix { })
64
-
blacklistExtensions seekTo;
0
0
0
0
0
0
65
66
-
buildLua = callPackage ./buildLua.nix { };
67
-
chapterskip = callPackage ./chapterskip.nix { };
68
-
convert = callPackage ./convert.nix { };
69
-
cutter = callPackage ./cutter.nix { };
70
-
dynamic-crop = callPackage ./dynamic-crop.nix { };
71
-
inhibit-gnome = callPackage ./inhibit-gnome.nix { };
72
-
memo = callPackage ./memo.nix { };
73
-
manga-reader = callPackage ./manga-reader.nix { };
74
-
modernx = callPackage ./modernx.nix { };
75
-
modernx-zydezu = callPackage ./modernx-zydezu.nix { };
76
-
mpris = callPackage ./mpris.nix { };
77
-
mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { };
78
-
mpv-notify-send = callPackage ./mpv-notify-send.nix { };
79
-
mpv-osc-modern = callPackage ./mpv-osc-modern.nix { };
80
-
mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
81
-
mpv-slicing = callPackage ./mpv-slicing.nix { };
82
-
mpv-webm = callPackage ./mpv-webm.nix { };
83
-
mpvacious = callPackage ./mpvacious.nix { };
84
-
quack = callPackage ./quack.nix { };
85
-
quality-menu = callPackage ./quality-menu.nix { };
86
-
reload = callPackage ./reload.nix { };
87
-
simple-mpv-webui = callPackage ./simple-mpv-webui.nix { };
88
-
sponsorblock = callPackage ./sponsorblock.nix { };
89
-
sponsorblock-minimal = callPackage ./sponsorblock-minimal.nix { };
90
-
thumbfast = callPackage ./thumbfast.nix { };
91
-
thumbnail = callPackage ./thumbnail.nix { };
92
-
uosc = callPackage ./uosc.nix { };
93
-
videoclip = callPackage ./videoclip.nix { };
94
-
visualizer = callPackage ./visualizer.nix { };
95
-
vr-reversal = callPackage ./vr-reversal.nix { };
96
-
webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { };
97
-
youtube-upnext = callPackage ./youtube-upnext.nix { };
98
-
};
99
100
aliases = {
101
youtube-quality = throw "'youtube-quality' is no longer maintained, use 'quality-menu' instead"; # added 2023-07-14
102
};
103
in
104
105
-
with lib; pipe scope [
0
106
(makeScope newScope)
107
-
(self:
108
-
assert builtins.intersectAttrs self aliases == {};
109
-
self // optionalAttrs config.allowAliases aliases)
0
0
110
recurseIntoAttrs
111
]
···
1
+
{
2
+
lib,
3
+
config,
4
+
newScope,
5
+
runCommand,
6
}:
7
8
let
9
+
unionOfDisjoints = lib.fold lib.attrsets.unionOfDisjoint { };
10
11
+
addTests =
12
+
name: drv:
13
+
if !lib.isDerivation drv then
14
drv
15
+
else
16
+
let
17
+
inherit (drv) scriptName;
18
+
scriptPath = "share/mpv/scripts/${scriptName}";
19
+
fullScriptPath = "${drv}/${scriptPath}";
20
+
in
21
+
drv.overrideAttrs (old: {
22
+
passthru = (old.passthru or { }) // {
23
+
tests = unionOfDisjoints [
24
+
(old.passthru.tests or { })
25
26
+
{
27
+
scriptName-is-valid =
28
+
runCommand "mpvScripts.${name}.passthru.tests.scriptName-is-valid"
29
+
{
30
+
meta.maintainers = with lib.maintainers; [ nicoo ];
31
+
preferLocalBuild = true;
32
+
}
33
+
''
34
+
if [ -e "${fullScriptPath}" ]; then
35
+
touch $out
36
+
else
37
+
echo "mpvScripts.\"${name}\" does not contain a script named \"${scriptName}\"" >&2
38
+
exit 1
39
+
fi
40
+
'';
41
+
}
42
43
+
# can't check whether `fullScriptPath` is a directory, in pure-evaluation mode
44
+
(
45
+
with lib;
46
+
optionalAttrs
47
+
(
48
+
!any (s: hasSuffix s drv.passthru.scriptName) [
49
+
".js"
50
+
".lua"
51
+
".so"
52
+
]
53
+
)
54
+
{
55
+
single-main-in-script-dir =
56
+
runCommand "mpvScripts.${name}.passthru.tests.single-main-in-script-dir"
57
+
{
58
+
meta.maintainers = with lib.maintainers; [ nicoo ];
59
+
preferLocalBuild = true;
60
+
}
61
+
''
62
+
die() {
63
+
echo "$@" >&2
64
+
exit 1
65
+
}
66
67
+
cd "${drv}/${scriptPath}" # so the glob expands to filenames only
68
+
mains=( main.* )
69
+
if [ "''${#mains[*]}" -eq 1 ]; then
70
+
touch $out
71
+
elif [ "''${#mains[*]}" -eq 0 ]; then
72
+
die "'${scriptPath}' contains no 'main.*' file"
73
+
else
74
+
die "'${scriptPath}' contains multiple 'main.*' files:" "''${mains[*]}"
75
+
fi
76
+
'';
77
+
}
78
+
)
79
+
];
80
+
};
81
+
});
82
83
+
scope =
84
+
self:
85
+
let
86
+
inherit (self) callPackage;
87
+
in
88
+
lib.mapAttrs addTests {
89
+
inherit (callPackage ./mpv.nix { })
90
+
acompressor
91
+
autocrop
92
+
autodeint
93
+
autoload
94
+
;
95
+
inherit (callPackage ./occivink.nix { }) blacklistExtensions seekTo;
96
97
+
buildLua = callPackage ./buildLua.nix { };
98
+
chapterskip = callPackage ./chapterskip.nix { };
99
+
convert = callPackage ./convert.nix { };
100
+
cutter = callPackage ./cutter.nix { };
101
+
dynamic-crop = callPackage ./dynamic-crop.nix { };
102
+
inhibit-gnome = callPackage ./inhibit-gnome.nix { };
103
+
memo = callPackage ./memo.nix { };
104
+
manga-reader = callPackage ./manga-reader.nix { };
105
+
modernx = callPackage ./modernx.nix { };
106
+
modernx-zydezu = callPackage ./modernx-zydezu.nix { };
107
+
mpris = callPackage ./mpris.nix { };
108
+
mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { };
109
+
mpv-notify-send = callPackage ./mpv-notify-send.nix { };
110
+
mpv-osc-modern = callPackage ./mpv-osc-modern.nix { };
111
+
mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
112
+
mpv-slicing = callPackage ./mpv-slicing.nix { };
113
+
mpv-webm = callPackage ./mpv-webm.nix { };
114
+
mpvacious = callPackage ./mpvacious.nix { };
115
+
quack = callPackage ./quack.nix { };
116
+
quality-menu = callPackage ./quality-menu.nix { };
117
+
reload = callPackage ./reload.nix { };
118
+
simple-mpv-webui = callPackage ./simple-mpv-webui.nix { };
119
+
sponsorblock = callPackage ./sponsorblock.nix { };
120
+
sponsorblock-minimal = callPackage ./sponsorblock-minimal.nix { };
121
+
thumbfast = callPackage ./thumbfast.nix { };
122
+
thumbnail = callPackage ./thumbnail.nix { };
123
+
uosc = callPackage ./uosc.nix { };
124
+
videoclip = callPackage ./videoclip.nix { };
125
+
visualizer = callPackage ./visualizer.nix { };
126
+
vr-reversal = callPackage ./vr-reversal.nix { };
127
+
webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { };
128
+
youtube-upnext = callPackage ./youtube-upnext.nix { };
129
+
};
130
131
aliases = {
132
youtube-quality = throw "'youtube-quality' is no longer maintained, use 'quality-menu' instead"; # added 2023-07-14
133
};
134
in
135
136
+
with lib;
137
+
pipe scope [
138
(makeScope newScope)
139
+
(
140
+
self:
141
+
assert builtins.intersectAttrs self aliases == { };
142
+
self // optionalAttrs config.allowAliases aliases
143
+
)
144
recurseIntoAttrs
145
]
+5
-4
pkgs/applications/video/mpv/scripts/dynamic-crop.nix
···
1
-
{ lib
2
-
, fetchFromGitHub
3
-
, unstableGitUpdater
4
-
, buildLua
0
5
}:
6
buildLua {
7
pname = "dynamic-crop";
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
unstableGitUpdater,
5
+
buildLua,
6
}:
7
buildLua {
8
pname = "dynamic-crop";
+14
-5
pkgs/applications/video/mpv/scripts/inhibit-gnome.nix
···
1
-
{ lib, stdenv, fetchFromGitHub, gitUpdater, pkg-config, dbus, mpv-unwrapped }:
0
0
0
0
0
0
0
0
2
3
stdenv.mkDerivation rec {
4
pname = "mpv-inhibit-gnome";
···
10
rev = "v${version}";
11
hash = "sha256-LSGg5gAQE2JpepBqhz6D6d3NlqYaU4bjvYf1F+oLphQ=";
12
};
13
-
passthru.updateScript = gitUpdater {
14
-
rev-prefix = "v";
15
-
};
16
17
nativeBuildInputs = [ pkg-config ];
18
19
-
buildInputs = [ dbus mpv-unwrapped ];
0
0
0
20
21
passthru.scriptName = "mpv_inhibit_gnome.so";
22
···
1
+
{
2
+
lib,
3
+
stdenv,
4
+
fetchFromGitHub,
5
+
gitUpdater,
6
+
pkg-config,
7
+
dbus,
8
+
mpv-unwrapped,
9
+
}:
10
11
stdenv.mkDerivation rec {
12
pname = "mpv-inhibit-gnome";
···
18
rev = "v${version}";
19
hash = "sha256-LSGg5gAQE2JpepBqhz6D6d3NlqYaU4bjvYf1F+oLphQ=";
20
};
21
+
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
0
0
22
23
nativeBuildInputs = [ pkg-config ];
24
25
+
buildInputs = [
26
+
dbus
27
+
mpv-unwrapped
28
+
];
29
30
passthru.scriptName = "mpv_inhibit_gnome.so";
31
+6
-5
pkgs/applications/video/mpv/scripts/memo.nix
···
1
-
{ fetchFromGitHub
2
-
, buildLua
3
-
, lib
4
-
, unstableGitUpdater
0
5
}:
6
7
buildLua {
···
15
hash = "sha256-m8ikXuw7PM4Btg8w7ufLneKA4fnYjMyfVJYueZILMw8=";
16
};
17
18
-
passthru.updateScript = unstableGitUpdater {};
19
20
meta = with lib; {
21
description = "A recent files menu for mpv";
···
1
+
{
2
+
fetchFromGitHub,
3
+
buildLua,
4
+
lib,
5
+
unstableGitUpdater,
6
}:
7
8
buildLua {
···
16
hash = "sha256-m8ikXuw7PM4Btg8w7ufLneKA4fnYjMyfVJYueZILMw8=";
17
};
18
19
+
passthru.updateScript = unstableGitUpdater { };
20
21
meta = with lib; {
22
description = "A recent files menu for mpv";
+6
-5
pkgs/applications/video/mpv/scripts/modernx-zydezu.nix
···
1
-
{ lib
2
-
, buildLua
3
-
, fetchFromGitHub
4
-
, makeFontsConf
5
-
, nix-update-script
0
6
}:
7
buildLua (finalAttrs: {
8
pname = "modernx-zydezu";
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
makeFontsConf,
6
+
nix-update-script,
7
}:
8
buildLua (finalAttrs: {
9
pname = "modernx-zydezu";
+6
-5
pkgs/applications/video/mpv/scripts/modernx.nix
···
1
-
{ lib
2
-
, buildLua
3
-
, fetchFromGitHub
4
-
, makeFontsConf
5
-
, nix-update-script
0
6
}:
7
buildLua (finalAttrs: {
8
pname = "modernx";
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
makeFontsConf,
6
+
nix-update-script,
7
}:
8
buildLua (finalAttrs: {
9
pname = "modernx";
+16
-3
pkgs/applications/video/mpv/scripts/mpris.nix
···
1
-
{ lib, stdenv, fetchFromGitHub, gitUpdater, pkg-config, glib, mpv-unwrapped, ffmpeg }:
0
0
0
0
0
0
0
0
0
2
3
stdenv.mkDerivation rec {
4
pname = "mpv-mpris";
···
10
rev = version;
11
hash = "sha256-vZIO6ILatIWa9nJYOp4AMKwvaZLahqYWRLMDOizyBI0=";
12
};
13
-
passthru.updateScript = gitUpdater {};
14
15
nativeBuildInputs = [ pkg-config ];
16
17
-
buildInputs = [ glib mpv-unwrapped ffmpeg ];
0
0
0
0
18
19
postPatch = ''
20
substituteInPlace Makefile --replace-fail 'PKG_CONFIG =' 'PKG_CONFIG ?='
···
1
+
{
2
+
lib,
3
+
stdenv,
4
+
fetchFromGitHub,
5
+
gitUpdater,
6
+
pkg-config,
7
+
glib,
8
+
mpv-unwrapped,
9
+
ffmpeg,
10
+
}:
11
12
stdenv.mkDerivation rec {
13
pname = "mpv-mpris";
···
19
rev = version;
20
hash = "sha256-vZIO6ILatIWa9nJYOp4AMKwvaZLahqYWRLMDOizyBI0=";
21
};
22
+
passthru.updateScript = gitUpdater { };
23
24
nativeBuildInputs = [ pkg-config ];
25
26
+
buildInputs = [
27
+
glib
28
+
mpv-unwrapped
29
+
ffmpeg
30
+
];
31
32
postPatch = ''
33
substituteInPlace Makefile --replace-fail 'PKG_CONFIG =' 'PKG_CONFIG ?='
+7
-9
pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix
···
1
-
{ lib
2
-
, fetchFromGitHub
3
-
, gitUpdater
4
-
, nodePackages
5
-
, stdenvNoCC
0
6
}:
7
stdenvNoCC.mkDerivation (finalAttrs: {
8
pname = "mpv-cheatsheet";
···
16
};
17
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
18
19
-
nativeBuildInputs = [
20
-
nodePackages.browserify
21
-
];
22
23
buildPhase = ''
24
runHook preBuild
···
35
36
runHook postInstall
37
'';
38
-
39
40
passthru.scriptName = "cheatsheet.js";
41
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
gitUpdater,
5
+
nodePackages,
6
+
stdenvNoCC,
7
}:
8
stdenvNoCC.mkDerivation (finalAttrs: {
9
pname = "mpv-cheatsheet";
···
17
};
18
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
19
20
+
nativeBuildInputs = [ nodePackages.browserify ];
0
0
21
22
buildPhase = ''
23
runHook preBuild
···
34
35
runHook postInstall
36
'';
0
37
38
passthru.scriptName = "cheatsheet.js";
39
+12
-7
pkgs/applications/video/mpv/scripts/mpv-notify-send.nix
···
1
-
{ lib
2
-
, buildLua
3
-
, fetchFromGitHub
4
-
, fetchpatch
5
-
, unstableGitUpdater
6
-
, libnotify }:
0
0
7
8
buildLua rec {
9
pname = "mpv-notify-send";
···
25
];
26
27
passthru.extraWrapperArgs = [
28
-
"--prefix" "PATH" ":" (lib.makeBinPath libnotify)
0
0
0
29
];
30
31
passthru.updateScript = unstableGitUpdater { };
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
fetchpatch,
6
+
unstableGitUpdater,
7
+
libnotify,
8
+
}:
9
10
buildLua rec {
11
pname = "mpv-notify-send";
···
27
];
28
29
passthru.extraWrapperArgs = [
30
+
"--prefix"
31
+
"PATH"
32
+
":"
33
+
(lib.makeBinPath libnotify)
34
];
35
36
passthru.updateScript = unstableGitUpdater { };
+6
-5
pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix
···
1
-
{ lib
2
-
, buildLua
3
-
, fetchFromGitHub
4
-
, makeFontsConf
5
-
, nix-update-script
0
6
}:
7
buildLua (finalAttrs: {
8
pname = "mpv-osc-modern";
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
makeFontsConf,
6
+
nix-update-script,
7
}:
8
buildLua (finalAttrs: {
9
pname = "mpv-osc-modern";
+8
-2
pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix
···
1
-
{ lib, buildLua, fetchFromGitHub, unstableGitUpdater, yt-dlp }:
0
0
0
0
0
0
2
3
buildLua rec {
4
pname = "mpv-playlistmanager";
···
10
rev = "1911dc053951169c98cfcfd9f44ef87d9122ca80";
11
hash = "sha256-pcdOMhkivLF5B86aNuHrqj77DuYLAFGlwFwY7jxkDkE=";
12
};
13
-
passthru.updateScript = unstableGitUpdater {};
14
15
postPatch = ''
16
substituteInPlace playlistmanager.lua \
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
unstableGitUpdater,
6
+
yt-dlp,
7
+
}:
8
9
buildLua rec {
10
pname = "mpv-playlistmanager";
···
16
rev = "1911dc053951169c98cfcfd9f44ef87d9122ca80";
17
hash = "sha256-pcdOMhkivLF5B86aNuHrqj77DuYLAFGlwFwY7jxkDkE=";
18
};
19
+
passthru.updateScript = unstableGitUpdater { };
20
21
postPatch = ''
22
substituteInPlace playlistmanager.lua \
+6
-5
pkgs/applications/video/mpv/scripts/mpv-webm.nix
···
1
-
{ lib
2
-
, buildLua
3
-
, fetchFromGitHub
4
-
, luaPackages
5
-
, unstableGitUpdater
0
6
}:
7
8
buildLua {
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
luaPackages,
6
+
unstableGitUpdater,
7
}:
8
9
buildLua {
+24
-17
pkgs/applications/video/mpv/scripts/mpv.nix
···
1
-
{ lib
2
-
, buildLua
3
-
, mpv-unwrapped
0
4
}:
5
6
-
let mkBuiltin = name: args:
7
-
let srcPath = "TOOLS/lua/${name}.lua";
8
-
in buildLua (lib.attrsets.recursiveUpdate rec {
9
-
inherit (mpv-unwrapped) src version;
10
-
pname = "mpv-${name}";
0
0
0
0
0
11
12
-
dontUnpack = true;
13
-
scriptPath = "${src}/${srcPath}";
14
-
15
-
meta = with lib; {
16
-
inherit (mpv-unwrapped.meta) license;
17
-
homepage = "https://github.com/mpv-player/mpv/blob/v${version}/${srcPath}";
18
-
};
19
-
} args);
20
21
-
in lib.mapAttrs (name: lib.makeOverridable (mkBuiltin name)) {
0
0
0
0
0
0
0
22
acompressor.meta = {
23
description = "Script to toggle and control ffmpeg's dynamic range compression filter.";
24
maintainers = with lib.maintainers; [ nicoo ];
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
mpv-unwrapped,
5
}:
6
7
+
let
8
+
mkBuiltin =
9
+
name: args:
10
+
let
11
+
srcPath = "TOOLS/lua/${name}.lua";
12
+
in
13
+
buildLua (
14
+
lib.attrsets.recursiveUpdate rec {
15
+
inherit (mpv-unwrapped) src version;
16
+
pname = "mpv-${name}";
17
18
+
dontUnpack = true;
19
+
scriptPath = "${src}/${srcPath}";
0
0
0
0
0
0
20
21
+
meta = with lib; {
22
+
inherit (mpv-unwrapped.meta) license;
23
+
homepage = "https://github.com/mpv-player/mpv/blob/v${version}/${srcPath}";
24
+
};
25
+
} args
26
+
);
27
+
in
28
+
lib.mapAttrs (name: lib.makeOverridable (mkBuiltin name)) {
29
acompressor.meta = {
30
description = "Script to toggle and control ffmpeg's dynamic range compression filter.";
31
maintainers = with lib.maintainers; [ nicoo ];
+9
-10
pkgs/applications/video/mpv/scripts/mpvacious.nix
···
1
-
{ lib
2
-
, buildLua
3
-
, fetchFromGitHub
4
-
, gitUpdater
5
-
, curl
6
-
, wl-clipboard
7
-
, xclip
0
8
}:
9
10
buildLua rec {
···
17
rev = "v${version}";
18
sha256 = "sha256-VHMXW2AzgX88EDnNshxo9Gh8mpXzRoTAq+58HKasUdo=";
19
};
20
-
passthru.updateScript = gitUpdater {
21
-
rev-prefix = "v";
22
-
};
23
24
postPatch = ''
25
substituteInPlace utils/forvo.lua \
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
gitUpdater,
6
+
curl,
7
+
wl-clipboard,
8
+
xclip,
9
}:
10
11
buildLua rec {
···
18
rev = "v${version}";
19
sha256 = "sha256-VHMXW2AzgX88EDnNshxo9Gh8mpXzRoTAq+58HKasUdo=";
20
};
21
+
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
0
0
22
23
postPatch = ''
24
substituteInPlace utils/forvo.lua \
+36
-32
pkgs/applications/video/mpv/scripts/occivink.nix
···
1
-
{ lib
2
-
, fetchFromGitHub
3
-
, unstableGitUpdater
4
-
, buildLua
0
5
}:
6
7
let
8
-
camelToKebab = let
9
-
inherit (lib.strings) match stringAsChars toLower;
10
-
isUpper = match "[A-Z]";
11
-
in stringAsChars (c: if isUpper c != null then "-${toLower c}" else c);
12
-
13
-
mkScript = name: args:
14
-
let self = rec {
15
-
pname = camelToKebab name;
16
-
version = "0-unstable-2024-01-11";
17
-
src = fetchFromGitHub {
18
-
owner = "occivink";
19
-
repo = "mpv-scripts";
20
-
rev = "d0390c8e802c2e888ff4a2e1d5e4fb040f855b89";
21
-
hash = "sha256-pc2aaO7lZaoYMEXv5M0WI7PtmqgkNbdtNiLZZwVzppM=";
22
-
};
23
-
passthru.updateScript = unstableGitUpdater {};
24
25
-
scriptPath = "scripts/${pname}.lua";
0
0
0
0
0
0
0
0
0
0
0
0
26
27
-
meta = with lib; {
28
-
homepage = "https://github.com/occivink/mpv-scripts";
29
-
license = licenses.unlicense;
30
-
maintainers = with maintainers; [ nicoo ];
31
-
};
32
33
-
# Sadly needed to make `common-updaters` work here
34
-
pos = builtins.unsafeGetAttrPos "version" self;
35
-
};
36
-
in buildLua (lib.attrsets.recursiveUpdate self args);
0
37
0
0
0
0
0
38
in
39
lib.mapAttrs (name: lib.makeOverridable (mkScript name)) {
40
41
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }`
42
seekTo.meta.description = "Mpv script for seeking to a specific position";
43
-
blacklistExtensions.meta.description =
44
-
"Automatically remove playlist entries based on their extension.";
45
}
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
unstableGitUpdater,
5
+
buildLua,
6
}:
7
8
let
9
+
camelToKebab =
10
+
let
11
+
inherit (lib.strings) match stringAsChars toLower;
12
+
isUpper = match "[A-Z]";
13
+
in
14
+
stringAsChars (c: if isUpper c != null then "-${toLower c}" else c);
0
0
0
0
0
0
0
0
0
0
15
16
+
mkScript =
17
+
name: args:
18
+
let
19
+
self = rec {
20
+
pname = camelToKebab name;
21
+
version = "0-unstable-2024-01-11";
22
+
src = fetchFromGitHub {
23
+
owner = "occivink";
24
+
repo = "mpv-scripts";
25
+
rev = "d0390c8e802c2e888ff4a2e1d5e4fb040f855b89";
26
+
hash = "sha256-pc2aaO7lZaoYMEXv5M0WI7PtmqgkNbdtNiLZZwVzppM=";
27
+
};
28
+
passthru.updateScript = unstableGitUpdater { };
29
30
+
scriptPath = "scripts/${pname}.lua";
0
0
0
0
31
32
+
meta = with lib; {
33
+
homepage = "https://github.com/occivink/mpv-scripts";
34
+
license = licenses.unlicense;
35
+
maintainers = with maintainers; [ nicoo ];
36
+
};
37
38
+
# Sadly needed to make `common-updaters` work here
39
+
pos = builtins.unsafeGetAttrPos "version" self;
40
+
};
41
+
in
42
+
buildLua (lib.attrsets.recursiveUpdate self args);
43
in
44
lib.mapAttrs (name: lib.makeOverridable (mkScript name)) {
45
46
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }`
47
seekTo.meta.description = "Mpv script for seeking to a specific position";
48
+
blacklistExtensions.meta.description = "Automatically remove playlist entries based on their extension.";
0
49
}
+10
-8
pkgs/applications/video/mpv/scripts/quack.nix
···
1
-
{ lib
2
-
, fetchFromGitHub
3
-
, unstableGitUpdater
4
-
, buildLua }:
0
0
5
6
buildLua rec {
7
pname = "mpv-quack";
···
9
version = "0-unstable-2020-05-27";
10
src = fetchFromGitHub {
11
owner = "CounterPillow";
12
-
repo = "mpv-quack";
13
-
rev = "1c87f36f9726d462dd112188c04be54d85692cf3";
14
-
hash = "sha256-dEnJbS8RJoAxpKINdoMHN4l7vpEdf7+C5JVWpK0VXMw=";
15
};
16
-
passthru.updateScript = unstableGitUpdater {};
17
18
meta = {
19
description = "Reduce audio volume after seeking";
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
unstableGitUpdater,
5
+
buildLua,
6
+
}:
7
8
buildLua rec {
9
pname = "mpv-quack";
···
11
version = "0-unstable-2020-05-27";
12
src = fetchFromGitHub {
13
owner = "CounterPillow";
14
+
repo = "mpv-quack";
15
+
rev = "1c87f36f9726d462dd112188c04be54d85692cf3";
16
+
hash = "sha256-dEnJbS8RJoAxpKINdoMHN4l7vpEdf7+C5JVWpK0VXMw=";
17
};
18
+
passthru.updateScript = unstableGitUpdater { };
19
20
meta = {
21
description = "Reduce audio volume after seeking";
+7
-8
pkgs/applications/video/mpv/scripts/quality-menu.nix
···
1
-
{ lib
2
-
, buildLua
3
-
, fetchFromGitHub
4
-
, gitUpdater
5
-
, oscSupport ? false
0
6
}:
7
8
buildLua rec {
···
15
rev = "v${version}";
16
hash = "sha256-yrcTxqpLnOI1Tq3khhflO3wzhyeTPuvKifyH5/P57Ns=";
17
};
18
-
passthru.updateScript = gitUpdater {
19
-
rev-prefix = "v";
20
-
};
21
22
extraScripts = lib.optional oscSupport "quality-menu-osc.lua";
23
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
gitUpdater,
6
+
oscSupport ? false,
7
}:
8
9
buildLua rec {
···
16
rev = "v${version}";
17
hash = "sha256-yrcTxqpLnOI1Tq3khhflO3wzhyeTPuvKifyH5/P57Ns=";
18
};
19
+
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
0
0
20
21
extraScripts = lib.optional oscSupport "quality-menu-osc.lua";
22
+10
-8
pkgs/applications/video/mpv/scripts/reload.nix
···
1
-
{ lib
2
-
, fetchFromGitHub
3
-
, unstableGitUpdater
4
-
, buildLua }:
0
0
5
6
buildLua rec {
7
pname = "mpv-reload";
···
9
version = "0-unstable-2024-03-22";
10
src = fetchFromGitHub {
11
owner = "4e6";
12
-
repo = pname;
13
-
rev = "1a6a9383ba1774708fddbd976e7a9b72c3eec938";
14
-
hash = "sha256-BshxCjec/UNGyiC0/g1Rai2NvG2qOIHXDDEUYwwdij0=";
15
};
16
-
passthru.updateScript = unstableGitUpdater {};
17
18
meta = {
19
description = "Manual & automatic reloading of videos";
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
unstableGitUpdater,
5
+
buildLua,
6
+
}:
7
8
buildLua rec {
9
pname = "mpv-reload";
···
11
version = "0-unstable-2024-03-22";
12
src = fetchFromGitHub {
13
owner = "4e6";
14
+
repo = pname;
15
+
rev = "1a6a9383ba1774708fddbd976e7a9b72c3eec938";
16
+
hash = "sha256-BshxCjec/UNGyiC0/g1Rai2NvG2qOIHXDDEUYwwdij0=";
17
};
18
+
passthru.updateScript = unstableGitUpdater { };
19
20
meta = {
21
description = "Manual & automatic reloading of videos";
+14
-8
pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix
···
1
-
{ lib, buildLua
2
-
, fetchFromGitHub
3
-
, gitUpdater
0
0
4
}:
5
buildLua rec {
6
pname = "simple-mpv-ui";
···
11
repo = "simple-mpv-webui";
12
rev = "v${version}";
13
hash = "sha256-I8lwpo3Hfpy3UnPMmHEJCdArVQnNL245NkxsYVmnMF0=";
14
-
sparseCheckout = [ "main.lua" "webui-page" ];
15
-
};
16
-
passthru.updateScript = gitUpdater {
17
-
rev-prefix = "v";
18
};
0
19
20
scriptPath = ".";
21
passthru.scriptName = "webui";
···
23
meta = with lib; {
24
description = "A web based user interface with controls for the mpv mediaplayer";
25
homepage = "https://github.com/open-dynaMIX/simple-mpv-webui";
26
-
maintainers = with maintainers; [ cript0nauta zopieux ];
0
0
0
27
longDescription = ''
28
You can access the webui when accessing http://127.0.0.1:8080 or
29
http://[::1]:8080 in your webbrowser. By default it listens on
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
gitUpdater,
6
}:
7
buildLua rec {
8
pname = "simple-mpv-ui";
···
13
repo = "simple-mpv-webui";
14
rev = "v${version}";
15
hash = "sha256-I8lwpo3Hfpy3UnPMmHEJCdArVQnNL245NkxsYVmnMF0=";
16
+
sparseCheckout = [
17
+
"main.lua"
18
+
"webui-page"
19
+
];
20
};
21
+
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
22
23
scriptPath = ".";
24
passthru.scriptName = "webui";
···
26
meta = with lib; {
27
description = "A web based user interface with controls for the mpv mediaplayer";
28
homepage = "https://github.com/open-dynaMIX/simple-mpv-webui";
29
+
maintainers = with maintainers; [
30
+
cript0nauta
31
+
zopieux
32
+
];
33
longDescription = ''
34
You can access the webui when accessing http://127.0.0.1:8080 or
35
http://[::1]:8080 in your webbrowser. By default it listens on
+9
-3
pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix
···
1
-
{ lib, buildLua, fetchFromGitea, unstableGitUpdater, curl, coreutils }:
0
0
0
0
0
0
0
2
3
buildLua {
4
pname = "mpv_sponsorblock_minimal";
···
21
'';
22
23
meta = with lib; {
24
-
description =
25
-
"A minimal script to skip sponsored segments of YouTube videos";
26
homepage = "https://codeberg.org/jouni/mpv_sponsorblock_minimal";
27
license = licenses.gpl3Only;
28
platforms = platforms.all;
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitea,
5
+
unstableGitUpdater,
6
+
curl,
7
+
coreutils,
8
+
}:
9
10
buildLua {
11
pname = "mpv_sponsorblock_minimal";
···
28
'';
29
30
meta = with lib; {
31
+
description = "A minimal script to skip sponsored segments of YouTube videos";
0
32
homepage = "https://codeberg.org/jouni/mpv_sponsorblock_minimal";
33
license = licenses.gpl3Only;
34
platforms = platforms.all;
+9
-4
pkgs/applications/video/mpv/scripts/sponsorblock.nix
···
1
-
{ lib, buildLua, fetchFromGitHub, fetchpatch, python3, nix-update-script }:
0
0
0
0
0
0
0
2
3
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.sponsorblock ]; }`
4
buildLua {
···
34
35
extraScripts = [ "sponsorblock_shared" ];
36
37
-
passthru.updateScript = nix-update-script {
38
-
extraArgs = [ "--version=branch" ];
39
-
};
40
41
meta = with lib; {
42
description = "Script for mpv to skip sponsored segments of YouTube videos";
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
fetchpatch,
6
+
python3,
7
+
nix-update-script,
8
+
}:
9
10
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.sponsorblock ]; }`
11
buildLua {
···
41
42
extraScripts = [ "sponsorblock_shared" ];
43
44
+
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
0
0
45
46
meta = with lib; {
47
description = "Script for mpv to skip sponsored segments of YouTube videos";
+12
-3
pkgs/applications/video/mpv/scripts/thumbfast.nix
···
1
-
{ lib, fetchFromGitHub, unstableGitUpdater, buildLua, mpv-unwrapped }:
0
0
0
0
0
0
2
3
buildLua {
4
pname = "mpv-thumbfast";
···
10
rev = "03e93feee5a85bf7c65db953ada41b4826e9f905";
11
hash = "sha256-5u5WBvWOEydJrnr/vilEgW4+fxkxM6wNjb9Fyyxx/1c=";
12
};
13
-
passthru.updateScript = unstableGitUpdater {};
14
15
passthru.extraWrapperArgs = [
16
-
"--prefix" "PATH" ":" (lib.makeBinPath [ mpv-unwrapped ])
0
0
0
17
];
18
19
meta = {
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
unstableGitUpdater,
5
+
buildLua,
6
+
mpv-unwrapped,
7
+
}:
8
9
buildLua {
10
pname = "mpv-thumbfast";
···
16
rev = "03e93feee5a85bf7c65db953ada41b4826e9f905";
17
hash = "sha256-5u5WBvWOEydJrnr/vilEgW4+fxkxM6wNjb9Fyyxx/1c=";
18
};
19
+
passthru.updateScript = unstableGitUpdater { };
20
21
passthru.extraWrapperArgs = [
22
+
"--prefix"
23
+
"PATH"
24
+
":"
25
+
(lib.makeBinPath [ mpv-unwrapped ])
26
];
27
28
meta = {
+8
-2
pkgs/applications/video/mpv/scripts/thumbnail.nix
···
1
-
{ lib, buildLua, fetchFromGitHub, gitUpdater, python3 }:
0
0
0
0
0
0
2
3
buildLua rec {
4
pname = "mpv-thumbnail-script";
···
10
rev = version;
11
sha256 = "sha256-J24Rou7BTE7zoiPlBkWuO9dtYJiuzkuwB4FROuzXzag=";
12
};
13
-
passthru.updateScript = gitUpdater {};
14
15
nativeBuildInputs = [ python3 ];
16
postPatch = "patchShebangs concat_files.py";
···
1
+
{
2
+
lib,
3
+
buildLua,
4
+
fetchFromGitHub,
5
+
gitUpdater,
6
+
python3,
7
+
}:
8
9
buildLua rec {
10
pname = "mpv-thumbnail-script";
···
16
rev = version;
17
sha256 = "sha256-J24Rou7BTE7zoiPlBkWuO9dtYJiuzkuwB4FROuzXzag=";
18
};
19
+
passthru.updateScript = gitUpdater { };
20
21
nativeBuildInputs = [ python3 ];
22
postPatch = "patchShebangs concat_files.py";
+9
-8
pkgs/applications/video/mpv/scripts/uosc.nix
···
1
-
{ lib
2
-
, fetchFromGitHub
3
-
, fetchpatch
4
-
, gitUpdater
5
-
, makeFontsConf
6
-
, buildLua
7
-
, buildGoModule
0
8
}:
9
10
buildLua (finalAttrs: {
···
18
rev = finalAttrs.version;
19
hash = "sha256-0GPDna9uOuhFDhA9A1fbkoKkgSB76qiDzJVQ9gjGcWo=";
20
};
21
-
passthru.updateScript = gitUpdater {};
22
23
tools = buildGoModule {
24
pname = "uosc-bin";
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
fetchpatch,
5
+
gitUpdater,
6
+
makeFontsConf,
7
+
buildLua,
8
+
buildGoModule,
9
}:
10
11
buildLua (finalAttrs: {
···
19
rev = finalAttrs.version;
20
hash = "sha256-0GPDna9uOuhFDhA9A1fbkoKkgSB76qiDzJVQ9gjGcWo=";
21
};
22
+
passthru.updateScript = gitUpdater { };
23
24
tools = buildGoModule {
25
pname = "uosc-bin";
+18
-15
pkgs/applications/video/mpv/scripts/videoclip.nix
···
1
-
{ lib
2
-
, fetchFromGitHub
3
-
, curl
4
-
, xclip
5
-
, wl-clipboard
6
-
, stdenv
7
-
, buildLua
8
-
, unstableGitUpdater
0
9
}:
10
buildLua {
11
pname = "videoclip";
···
18
hash = "sha256-Sg6LHU9OVmVx3cTs8Y0WL8wACb5BlVyeBRccoX+7BXY=";
19
};
20
21
-
patchPhase = ''
22
-
substituteInPlace platform.lua \
23
-
--replace \'curl\' \'${lib.getExe curl}\' \
24
-
'' + lib.optionalString stdenv.isLinux ''
25
-
--replace xclip ${lib.getExe xclip} \
26
-
--replace wl-copy ${lib.getExe' wl-clipboard "wl-copy"}
27
-
'';
0
0
28
29
scriptPath = ".";
30
passthru.scriptName = "videoclip";
···
1
+
{
2
+
lib,
3
+
fetchFromGitHub,
4
+
curl,
5
+
xclip,
6
+
wl-clipboard,
7
+
stdenv,
8
+
buildLua,
9
+
unstableGitUpdater,
10
}:
11
buildLua {
12
pname = "videoclip";
···
19
hash = "sha256-Sg6LHU9OVmVx3cTs8Y0WL8wACb5BlVyeBRccoX+7BXY=";
20
};
21
22
+
patchPhase =
23
+
''
24
+
substituteInPlace platform.lua \
25
+
--replace \'curl\' \'${lib.getExe curl}\' \
26
+
''
27
+
+ lib.optionalString stdenv.isLinux ''
28
+
--replace xclip ${lib.getExe xclip} \
29
+
--replace wl-copy ${lib.getExe' wl-clipboard "wl-copy"}
30
+
'';
31
32
scriptPath = ".";
33
passthru.scriptName = "videoclip";
+2
-2
pkgs/applications/video/mpv/scripts/visualizer.nix
···
14
rev = "b4246984ba6dc6820adef5c8bbf793af85c9ab8e";
15
sha256 = "ZNUzw4OW7z+yGTxim7CCWJdWmihDFOQAQk3bC5Ijcbs=";
16
};
17
-
passthru.updateScript = unstableGitUpdater {};
18
19
meta = with lib; {
20
description = "various audio visualization";
21
homepage = "https://github.com/mfcc64/mpv-scripts";
22
-
maintainers = with maintainers; [kmein];
23
};
24
}
···
14
rev = "b4246984ba6dc6820adef5c8bbf793af85c9ab8e";
15
sha256 = "ZNUzw4OW7z+yGTxim7CCWJdWmihDFOQAQk3bC5Ijcbs=";
16
};
17
+
passthru.updateScript = unstableGitUpdater { };
18
19
meta = with lib; {
20
description = "various audio visualization";
21
homepage = "https://github.com/mfcc64/mpv-scripts";
22
+
maintainers = with maintainers; [ kmein ];
23
};
24
}
+8
-4
pkgs/applications/video/mpv/scripts/vr-reversal.nix
···
1
-
{ lib, stdenvNoCC, fetchFromGitHub, gitUpdater, ffmpeg }:
0
0
0
0
0
0
2
3
stdenvNoCC.mkDerivation rec {
4
pname = "vr-reversal";
···
10
rev = "v${version}";
11
sha256 = "1wn2ngcvn7wcsl3kmj782x5q9130qw951lj6ilrkafp6q6zscpqr";
12
};
13
-
passthru.updateScript = gitUpdater {
14
-
rev-prefix = "v";
15
-
};
16
17
dontBuild = true;
18
···
1
+
{
2
+
lib,
3
+
stdenvNoCC,
4
+
fetchFromGitHub,
5
+
gitUpdater,
6
+
ffmpeg,
7
+
}:
8
9
stdenvNoCC.mkDerivation rec {
10
pname = "vr-reversal";
···
16
rev = "v${version}";
17
sha256 = "1wn2ngcvn7wcsl3kmj782x5q9130qw951lj6ilrkafp6q6zscpqr";
18
};
19
+
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
0
0
20
21
dontBuild = true;
22
+9
-4
pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix
···
1
-
{ lib, buildNpmPackage, fetchFromGitHub, gitUpdater, nodejs, python3 }:
0
0
0
0
0
0
0
2
3
buildNpmPackage rec {
4
pname = "webtorrent-mpv-hook";
···
10
rev = "v${version}";
11
hash = "sha256-/dMtXcIyfAs++Zgz2CxRW0tkzn5QjS+WVGChlCyrU0U=";
12
};
13
-
passthru.updateScript = gitUpdater {
14
-
rev-prefix = "v";
15
-
};
16
17
postPatch = ''
18
substituteInPlace src/webtorrent.ts --replace-fail "node_path: 'node'" "node_path: '${lib.getExe nodejs}'"
···
1
+
{
2
+
lib,
3
+
buildNpmPackage,
4
+
fetchFromGitHub,
5
+
gitUpdater,
6
+
nodejs,
7
+
python3,
8
+
}:
9
10
buildNpmPackage rec {
11
pname = "webtorrent-mpv-hook";
···
17
rev = "v${version}";
18
hash = "sha256-/dMtXcIyfAs++Zgz2CxRW0tkzn5QjS+WVGChlCyrU0U=";
19
};
20
+
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
0
0
21
22
postPatch = ''
23
substituteInPlace src/webtorrent.ts --replace-fail "node_path: 'node'" "node_path: '${lib.getExe nodejs}'"
+7
-1
pkgs/applications/video/mpv/scripts/youtube-upnext.nix
···
1
-
{ buildLua, fetchFromGitHub, curl, unstableGitUpdater, lib }:
0
0
0
0
0
0
2
3
buildLua rec {
4
pname = "youtube-upnext";
···
1
+
{
2
+
buildLua,
3
+
fetchFromGitHub,
4
+
curl,
5
+
unstableGitUpdater,
6
+
lib,
7
+
}:
8
9
buildLua rec {
10
pname = "youtube-upnext";