diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/video/mpv/scripts')
21 files changed, 131 insertions, 18 deletions
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix index 0027fa722596..e0afa7d932c6 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix @@ -64,6 +64,17 @@ lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy ''; passthru = { inherit scriptName; }; - meta.platforms = lib.platforms.all; + meta = { + platforms = lib.platforms.all; + } // ( + let pos = + if (args.meta or {}) ? description then + builtins.unsafeGetAttrPos "description" args.meta + else + builtins.unsafeGetAttrPos "pname" args; + in lib.optionalAttrs + (pos != null) + { position = "${pos.file}:${toString pos.line}"; } + ); }) )) diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/chapterskip.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/chapterskip.nix index 20de5d88fd33..9d0c7dafc1db 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/chapterskip.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/chapterskip.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, unstableGitUpdater , buildLua }: buildLua { @@ -12,6 +13,7 @@ buildLua { rev = "b26825316e3329882206ae78dc903ebc4613f039"; hash = "sha256-OTrLQE3rYvPQamEX23D6HttNjx3vafWdTMxTiWpDy90="; }; + passthru.updateScript = unstableGitUpdater {}; meta = { description = "Automatically skips chapters based on title"; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/convert.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/convert.nix index 4f90b0c62ed0..aaf9afcc0d52 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/convert.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/convert.nix @@ -1,14 +1,22 @@ -{ lib, fetchgit, buildLua -, yad, mkvtoolnix-cli, libnotify }: +{ lib +, fetchgit +, unstableGitUpdater + +, buildLua +, libnotify +, mkvtoolnix-cli +, yad +}: buildLua { pname = "mpv-convert-script"; - version = "2016-03-18"; + version = "unstable-2015-07-02"; src = fetchgit { url = "https://gist.github.com/Zehkul/25ea7ae77b30af959be0"; rev = "f95cee43e390e843a47e8ec9d1711a12a8cd343d"; sha256 = "13m7l4sy2r8jv2sfrb3vvqvnim4a9ilnv28q5drlg09v298z3mck"; }; + passthru.updateScript = unstableGitUpdater {}; patches = [ ./convert.patch ]; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/cutter.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/cutter.nix index 4c385b766c78..69eba782cc1d 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/cutter.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/cutter.nix @@ -1,4 +1,4 @@ -{ lib, buildLua, fetchFromGitHub, makeWrapper }: +{ lib, buildLua, fetchFromGitHub, makeWrapper, unstableGitUpdater }: buildLua { pname = "video-cutter"; @@ -10,6 +10,7 @@ buildLua { rev = "01a0396c075d5f8bbd1de5b571e6231f8899ab65"; sha256 = "sha256-veoRFzUCRH8TrvR7x+WWoycpDyxqrJZ/bnp61dVc0pE="; }; + passthru.updateScript = unstableGitUpdater {}; nativeBuildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix index 158a7c491007..3451b6e3dc47 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix @@ -72,7 +72,9 @@ let mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { }; mpv-webm = callPackage ./mpv-webm.nix { }; mpvacious = callPackage ./mpvacious.nix { }; + quack = callPackage ./quack.nix { }; quality-menu = callPackage ./quality-menu.nix { }; + reload = callPackage ./reload.nix { }; simple-mpv-webui = callPackage ./simple-mpv-webui.nix { }; sponsorblock = callPackage ./sponsorblock.nix { }; sponsorblock-minimal = callPackage ./sponsorblock-minimal.nix { }; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/inhibit-gnome.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/inhibit-gnome.nix index 2955dfb7c0c8..618c74adea93 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/inhibit-gnome.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/inhibit-gnome.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, dbus, mpv-unwrapped }: +{ lib, stdenv, fetchFromGitHub, gitUpdater, pkg-config, dbus, mpv-unwrapped }: stdenv.mkDerivation rec { pname = "mpv-inhibit-gnome"; @@ -10,6 +10,9 @@ stdenv.mkDerivation rec { rev = "v${version}"; hash = "sha256-LSGg5gAQE2JpepBqhz6D6d3NlqYaU4bjvYf1F+oLphQ="; }; + passthru.updateScript = gitUpdater { + rev-prefix = "v"; + }; nativeBuildInputs = [ pkg-config ]; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix index cc230c2f1f43..338f0a8dd482 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, glib, mpv-unwrapped, ffmpeg }: +{ lib, stdenv, fetchFromGitHub, gitUpdater, pkg-config, glib, mpv-unwrapped, ffmpeg }: stdenv.mkDerivation rec { pname = "mpv-mpris"; @@ -10,6 +10,7 @@ stdenv.mkDerivation rec { rev = version; hash = "sha256-vZIO6ILatIWa9nJYOp4AMKwvaZLahqYWRLMDOizyBI0="; }; + passthru.updateScript = gitUpdater {}; nativeBuildInputs = [ pkg-config ]; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix index ec25801edd22..874263f7b2d2 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix @@ -1,4 +1,4 @@ -{ lib, buildLua, fetchFromGitHub, yt-dlp }: +{ lib, buildLua, fetchFromGitHub, unstableGitUpdater, yt-dlp }: buildLua rec { pname = "mpv-playlistmanager"; @@ -10,6 +10,7 @@ buildLua rec { rev = "579490c7ae1becc129736b7632deec4f3fb90b99"; hash = "sha256-swOtoB8UV/HPTpQRGXswAfUYsyC2Nj/QRIkGP8X1jk0="; }; + passthru.updateScript = unstableGitUpdater {}; postPatch = '' substituteInPlace playlistmanager.lua \ diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-webm.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-webm.nix index b155846750dc..5645d6a65f6b 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-webm.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-webm.nix @@ -2,7 +2,7 @@ , buildLua , fetchFromGitHub , luaPackages -, nix-update-script +, unstableGitUpdater }: buildLua { @@ -15,15 +15,12 @@ buildLua { rev = "6b5863f68275b3dc91c2507284c039ec8a4cbd97"; hash = "sha256-rJamBm6FyxWcJO7VXXOUTO9piWCkPfEVdqGKGeJ/h0c="; }; + passthru.updateScript = unstableGitUpdater {}; dontBuild = false; nativeBuildInputs = [ luaPackages.moonscript ]; scriptPath = "build/webm.lua"; - passthru.updateScript = nix-update-script { - extraArgs = [ "--version=branch" ]; - }; - meta = with lib; { description = "Simple WebM maker for mpv, with no external dependencies"; homepage = "https://github.com/ekisu/mpv-webm"; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpvacious.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpvacious.nix index 9c1c6ce80f62..c30c450a28c0 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/mpvacious.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpvacious.nix @@ -1,6 +1,7 @@ { lib , buildLua , fetchFromGitHub +, gitUpdater , curl , wl-clipboard , xclip @@ -16,6 +17,9 @@ buildLua rec { rev = "v${version}"; sha256 = "sha256-XTnib4cguWFEvZtmsLfkesbjFbkt2YoyYLT587ajyUM="; }; + passthru.updateScript = gitUpdater { + rev-prefix = "v"; + }; postPatch = '' substituteInPlace utils/forvo.lua \ diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/quack.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/quack.nix new file mode 100644 index 000000000000..e7138de92877 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/quack.nix @@ -0,0 +1,31 @@ +{ lib +, fetchFromGitHub +, unstableGitUpdater +, buildLua }: + +buildLua rec { + pname = "mpv-quack"; + + version = "unstable-2020-05-26"; + src = fetchFromGitHub { + owner = "CounterPillow"; + repo = pname; + rev = "1c87f36f9726d462dd112188c04be54d85692cf3"; + hash = "sha256-dEnJbS8RJoAxpKINdoMHN4l7vpEdf7+C5JVWpK0VXMw="; + }; + passthru.updateScript = unstableGitUpdater {}; + + meta = { + description = "Reduce audio volume after seeking"; + longDescription = '' + quack is an mpv script to temporarily reduce the volume after a seek, + in order to avoid loud noises when scrubbing through a movie. + + The volume is linearly increased back up to its original level. + Repeated seeks before the transition is done work as well. + ''; + homepage = "https://github.com/CounterPillow/quack"; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ nicoo ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/quality-menu.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/quality-menu.nix index 8b9aadaccbc7..c75e81068713 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/quality-menu.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/quality-menu.nix @@ -1,6 +1,7 @@ { lib , buildLua , fetchFromGitHub +, gitUpdater , oscSupport ? false }: @@ -14,6 +15,9 @@ buildLua rec { rev = "v${version}"; hash = "sha256-yrcTxqpLnOI1Tq3khhflO3wzhyeTPuvKifyH5/P57Ns="; }; + passthru.updateScript = gitUpdater { + rev-prefix = "v"; + }; extraScripts = lib.optional oscSupport "quality-menu-osc.lua"; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/reload.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/reload.nix new file mode 100644 index 000000000000..6f316e2f5d42 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/reload.nix @@ -0,0 +1,29 @@ +{ lib +, fetchFromGitHub +, unstableGitUpdater +, buildLua }: + +buildLua rec { + pname = "mpv-reload"; + + version = "unstable-2023-12-19"; + src = fetchFromGitHub { + owner = "4e6"; + repo = pname; + rev = "133d596f6d369f320b4595bbed1f4a157b7b9ee5"; + hash = "sha256-B+4TCmf1T7MuwtbL+hGZoN1ktI31hnO5yayMG1zW8Ng="; + }; + passthru.updateScript = unstableGitUpdater {}; + + meta = { + description = "Manual & automatic reloading of videos"; + longDescription = '' + This script adds reloading of videos, automatically on timers (when stuck + buffering etc.) or manually on keybinds, to help with cases where a stream + is not loading further due to a network or remote issue. + ''; + homepage = "https://github.com/4e6/mpv-reload"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ nicoo ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix index b1f3f4595632..bf973c9206c7 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix @@ -1,5 +1,7 @@ { lib, buildLua -, fetchFromGitHub }: +, fetchFromGitHub +, gitUpdater +}: buildLua rec { pname = "simple-mpv-ui"; version = "3.0.0"; @@ -11,6 +13,9 @@ buildLua rec { hash = "sha256-I8lwpo3Hfpy3UnPMmHEJCdArVQnNL245NkxsYVmnMF0="; sparseCheckout = [ "main.lua" "webui-page" ]; }; + passthru.updateScript = gitUpdater { + rev-prefix = "v"; + }; scriptPath = "."; passthru.scriptName = "webui"; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix index f7f8049cbba3..841fc8eb9b4f 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix @@ -1,6 +1,7 @@ { lib , buildLua , fetchFromGitea +, unstableGitUpdater , curl }: @@ -16,6 +17,7 @@ buildLua { rev = "ca2844b8cf7674bfccd282d389a50427742251d3"; hash = "sha256-28HWZ6nOhKiE+5Ya1N3Vscd8aeH9OKS0t72e/xPfFQQ="; }; + passthru.updateScript = unstableGitUpdater {}; preInstall = '' substituteInPlace sponsorblock_minimal.lua \ diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/thumbfast.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/thumbfast.nix index 3ddb701f6d1d..7336fbe35dad 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/thumbfast.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/thumbfast.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildLua, mpv-unwrapped }: +{ lib, fetchFromGitHub, unstableGitUpdater, buildLua, mpv-unwrapped }: buildLua { pname = "mpv-thumbfast"; @@ -10,6 +10,7 @@ buildLua { rev = "03e93feee5a85bf7c65db953ada41b4826e9f905"; hash = "sha256-5u5WBvWOEydJrnr/vilEgW4+fxkxM6wNjb9Fyyxx/1c="; }; + passthru.updateScript = unstableGitUpdater {}; passthru.extraWrapperArgs = [ "--prefix" "PATH" ":" "${lib.getBin mpv-unwrapped}/bin" diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/thumbnail.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/thumbnail.nix index 4ed545363839..40c4fa8776d8 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/thumbnail.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/thumbnail.nix @@ -1,4 +1,4 @@ -{ lib, buildLua, fetchFromGitHub, python3 }: +{ lib, buildLua, fetchFromGitHub, gitUpdater, python3 }: buildLua rec { pname = "mpv-thumbnail-script"; @@ -10,6 +10,7 @@ buildLua rec { rev = version; sha256 = "sha256-J24Rou7BTE7zoiPlBkWuO9dtYJiuzkuwB4FROuzXzag="; }; + passthru.updateScript = gitUpdater {}; nativeBuildInputs = [ python3 ]; postPatch = "patchShebangs concat_files.py"; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/uosc.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/uosc.nix index 4c434d49f368..e5bb972a2418 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/uosc.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/uosc.nix @@ -1,6 +1,7 @@ { lib , fetchFromGitHub , fetchpatch +, gitUpdater , makeFontsConf , buildLua , buildGoModule @@ -17,6 +18,7 @@ buildLua (finalAttrs: { rev = finalAttrs.version; hash = "sha256-+4k8T1yX3IRXK3XkUShsuJSH9w1Zla7CaRENcIqX4iM="; }; + passthru.updateScript = gitUpdater {}; tools = buildGoModule { pname = "uosc-bin"; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/visualizer.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/visualizer.nix index dedc2c62e907..bf412bdbf28f 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/visualizer.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/visualizer.nix @@ -2,6 +2,7 @@ lib, buildLua, fetchFromGitHub, + unstableGitUpdater, }: buildLua { pname = "visualizer"; @@ -13,6 +14,7 @@ buildLua { rev = "7dbbfb283508714b73ead2a57b6939da1d139bd3"; sha256 = "zzB4uBc1M2Gdr/JKY2uk8MY0hmQl1XeomkfTzuM45oE="; }; + passthru.updateScript = unstableGitUpdater {}; meta = with lib; { description = "various audio visualization"; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/vr-reversal.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/vr-reversal.nix index 4c4aacef31dc..9a7b335a6591 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/vr-reversal.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/vr-reversal.nix @@ -1,4 +1,4 @@ -{ lib, stdenvNoCC, fetchFromGitHub, ffmpeg }: +{ lib, stdenvNoCC, fetchFromGitHub, gitUpdater, ffmpeg }: stdenvNoCC.mkDerivation rec { pname = "vr-reversal"; @@ -10,6 +10,9 @@ stdenvNoCC.mkDerivation rec { rev = "v${version}"; sha256 = "1wn2ngcvn7wcsl3kmj782x5q9130qw951lj6ilrkafp6q6zscpqr"; }; + passthru.updateScript = gitUpdater { + rev-prefix = "v"; + }; dontBuild = true; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix index e870818fc64f..10fe3d0cdce0 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix @@ -1,4 +1,4 @@ -{ lib, buildNpmPackage, fetchFromGitHub, nodejs, python3 }: +{ lib, buildNpmPackage, fetchFromGitHub, gitUpdater, nodejs, python3 }: buildNpmPackage rec { pname = "webtorrent-mpv-hook"; @@ -10,6 +10,9 @@ buildNpmPackage rec { rev = "v${version}"; hash = "sha256-/dMtXcIyfAs++Zgz2CxRW0tkzn5QjS+WVGChlCyrU0U="; }; + passthru.updateScript = gitUpdater { + rev-prefix = "v"; + }; postPatch = '' substituteInPlace src/webtorrent.ts --replace "node_path: 'node'" "node_path: '${nodejs}/bin/node'" |