mpv: move wrapper under mpv-unwrapped.passthru

And refactor to fit.

wrapper
This commit is contained in:
Anderson Torres
2024-06-08 01:24:00 -03:00
parent bb5d71826c
commit cc419c0148
3 changed files with 16 additions and 12 deletions
+3
View File
@@ -1,5 +1,6 @@
{ lib
, buildPackages
, callPackage
, config
, stdenv
, fetchFromGitHub
@@ -256,6 +257,8 @@ in stdenv'.mkDerivation (finalAttrs: {
vapoursynthSupport
vapoursynth
;
wrapper = callPackage ./wrapper.nix { };
};
meta = {
+10 -8
View File
@@ -7,21 +7,23 @@
, symlinkJoin
, writeTextDir
, yt-dlp
# the unwrapped mpv derivation
, mpv
}:
# the unwrapped mpv derivation - 1st argument to `wrapMpv`
mpv:
let
# arguments to the function (exposed as `wrapMpv` in all-packages.nix)
# arguments to the function (exposed as `mpv-unwrapped.wrapper` in top-level)
wrapper = {
mpv,
extraMakeWrapperArgs ? [],
youtubeSupport ? true,
# a set of derivations (probably from `mpvScripts`) where each is
# expected to have a `scriptName` passthru attribute that points to the
# name of the script that would reside in the script's derivation's
# a set of derivations (probably from `mpvScripts`) where each is expected
# to have a `scriptName` passthru attribute that points to the name of the
# script that would reside in the script's derivation's
# `$out/share/mpv/scripts/`.
# A script can optionally also provide an `extraWrapperArgs` passthru attribute.
#
# A script can optionally also provide `passthru.extraWrapperArgs`
# attribute.
scripts ? [],
extraUmpvWrapperArgs ? []
}:
+3 -4
View File
@@ -32942,11 +32942,10 @@ with pkgs;
inherit lua;
};
shaka-packager = callPackage ../applications/video/shaka-packager { };
# Wrap avoiding rebuild
mpv = mpv-unwrapped.wrapper { mpv = mpv-unwrapped; };
# Wraps without triggering a rebuild
wrapMpv = callPackage ../applications/video/mpv/wrapper.nix { };
mpv = wrapMpv mpv-unwrapped { };
shaka-packager = callPackage ../applications/video/shaka-packager { };
mpvpaper = callPackage ../tools/wayland/mpvpaper { };