mpv: move wrapper under mpv-unwrapped.passthru

And refactor to fit.

wrapper
This commit is contained in:
Anderson Torres 2024-05-22 14:33:40 -03:00
parent bb5d71826c
commit cc419c0148
3 changed files with 16 additions and 12 deletions

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 = {

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 ? []
}:

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 { };