Change:
<!-- Note that these are hard requirements --<!-- You can use the "Go to file" functionality on github to find the package Then you can go to the history for this package Find the latest "packagename: oldversion -newversion" commit The "newversion" is the the current version of the package --- <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- name: mpv <!-- The current version can be found easily with the same process than above for checking the master branch If an open PR is present for the package, take this version as the current one and link to the PR --current version: 0.33.1 desired version: 0.34.0 <!-- Search your package here: If no maintainer is listed for your package, tag the person that last updated the package --maintainers: Please tag this issue in your PR.

Discussion:
<del> { config, lib, stdenv, fetchFromGitHub, fetchpatch , addOpenGLRunpath, docutils, perl, pkg-config, python3, wafHook, which , ffmpeg, freefont_ttf, freetype, libass, libpthreadstubs, mujs , nv-codec-headers, lua, libuchardet, libiconv ? null </del> <ins> { config , lib , stdenv , fetchFromGitHub , fetchpatch , addOpenGLRunpath , docutils , perl , pkg-config , python3 , wafHook , which , ffmpeg , freefont_ttf , freetype , libass , libpthreadstubs , mujs , nv-codec-headers , lua , libuchardet , libiconv ? null </ins> , CoreFoundation, Cocoa, CoreAudio, MediaPlayer , waylandSupport ? stdenv.isLinux

, libdrm ? null , mesa   ? null <del> , alsaSupport        ? stdenv.isLinux, alsa-lib       ? null </del> <ins> , alsaSupport        ? stdenv.isLinux, alsa-lib      ? null </ins> , archiveSupport     ? true,           libarchive    ? null , bluraySupport      ? true,           libbluray     ? null , bs2bSupport        ? true,           libbs2b       ? null

in stdenv.mkDerivation rec { pname = "mpv"; <del> version = "0.33.1"; </del> <ins> version = "0.34.0"; </ins> <del> outputs = [ "out" "dev" ]; </del> <ins> outputs = [ "out" "dev" "man" ]; </ins> src = fetchFromGitHub { <del> owner  = "mpv-player"; repo   = "mpv"; rev    = "v${version}"; sha256 = "06rw1f55zcsj78ql8w70j9ljp2qb1pv594xj7q9cmq7i92a7hq45"; </del> <ins> owner = "mpv-player"; repo = "mpv"; rev = "v${version}"; sha256 = "sha256-qa6xZV4aLcHBMa2bIqoKjte4+KWEGGZre4L0u1+eDE8="; </ins> }; <del> patches = [ # To make mpv build with libplacebo 3.104.0: (fetchpatch { # vo_gpu: placebo: update for upstream API changes url = "https://github.com/mpv-player/mpv/commit/7c4465cefb27d4e0d07535d368febdf77b579566.patch"; sha256 = "1yfc6220ak5kc5kf7zklmsa944nr9q0qaa27l507pgrmvcyiyzrx"; }) # TOREMOVE when > 0.33.1 # youtube-dl has been abandonned and is now unusable w/ # youtube.com. Mpv migrated to yt-dlp since the 0.33.1 but did not # cut a new release yet. See # https://github.com/mpv-player/mpv/pull/9209 (fetchpatch { url = "https://github.com/mpv-player/mpv/commit/d1c92bfd79ef81ac804fcc20aee2ed24e8d587aa.patch"; sha256 = "1dwxzng3gsrx0gjljm5jmfcjz3pzdss9z2l0n25rmmb4nbcrcx1f"; }) ]; </del> postPatch = '' patchShebangs ./TOOLS/ ''; <del> passthru = { inherit # The wrapper consults luaEnv and lua.version luaEnv lua # In the wrapper, we want to reference vapoursynth which has the # `python3` passthru attribute (which has the `sitePrefix` # attribute). This way we'll be sure that in the wrapper we'll # use the same python3.sitePrefix used to build vapoursynth. vapoursynthSupport vapoursynth ; }; NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext " + optionalString stdenv.isDarwin "-framework CoreFoundation"; </del> <ins> NIX_LDFLAGS = lib.optionalString x11Support "-lX11 -lXext " + lib.optionalString stdenv.isDarwin "-framework CoreFoundation"; </ins> wafConfigureFlags = [ "--enable-libmpv-shared"

"--disable-libmpv-static" "--disable-static-build" "--disable-build-date" # Purity <del> (enableFeature archiveSupport  "libarchive") (enableFeature cddaSupport     "cdda") (enableFeature dvdnavSupport   "dvdnav") (enableFeature openalSupport   "openal") (enableFeature sdl2Support     "sdl2") (enableFeature sixelSupport    "sixel") (enableFeature vaapiSupport    "vaapi") (enableFeature waylandSupport  "wayland") (enableFeature stdenv.isLinux  "dvbin") </del> <ins> (lib.enableFeature archiveSupport  "libarchive") (lib.enableFeature cddaSupport     "cdda") (lib.enableFeature dvdnavSupport   "dvdnav") (lib.enableFeature openalSupport   "openal") (lib.enableFeature sdl2Support     "sdl2") (lib.enableFeature sixelSupport    "sixel") (lib.enableFeature vaapiSupport    "vaapi") (lib.enableFeature waylandSupport  "wayland") (lib.enableFeature stdenv.isLinux  "dvbin") </ins> ] # Disable whilst Swift isn't supported ++ lib.optional (!swiftSupport) "--disable-macos-cocoa-cb"; nativeBuildInputs = [ <del> addOpenGLRunpath docutils perl pkg-config python3 wafHook which ] ++ optional swiftSupport swift; </del> <ins> addOpenGLRunpath docutils perl pkg-config python3 wafHook which ] ++ lib.optionals swiftSupport [ swift ]; </ins> buildInputs = [ <del> ffmpeg freetype libass libpthreadstubs luaEnv libuchardet mujs ] ++ optional alsaSupport        alsa-lib ++ optional archiveSupport     libarchive ++ optional bluraySupport      libbluray ++ optional bs2bSupport        libbs2b ++ optional cacaSupport        libcaca ++ optional cmsSupport         lcms2 ++ optional jackaudioSupport   libjack2 ++ optional libpngSupport      libpng ++ optional openalSupport      openalSoft ++ optional pulseSupport       libpulseaudio ++ optional rubberbandSupport  rubberband ++ optional screenSaverSupport libXScrnSaver ++ optional sdl2Support        SDL2 ++ optional sixelSupport       libsixel ++ optional speexSupport       speex ++ optional theoraSupport      libtheora ++ optional vaapiSupport       libva ++ optional vapoursynthSupport vapoursynth ++ optional vdpauSupport       libvdpau ++ optional xineramaSupport    libXinerama ++ optional xvSupport          libXv ++ optional zimgSupport        zimg ++ optional stdenv.isDarwin    libiconv ++ optional stdenv.isLinux     nv-codec-headers ++ optionals cddaSupport       [ libcdio libcdio-paranoia ] ++ optionals drmSupport        [ libdrm mesa ] ++ optionals dvdnavSupport     [ libdvdnav libdvdnav.libdvdread ] ++ optionals waylandSupport    [ wayland wayland-protocols libxkbcommon ] ++ optionals x11Support        [ libX11 libXext libGLU libGL libXxf86vm libXrandr ] ++ optionals vulkanSupport     [ libplacebo shaderc vulkan-headers vulkan-loader ] ++ optionals stdenv.isDarwin   [ CoreFoundation Cocoa CoreAudio MediaPlayer ]; </del> <ins> ffmpeg freetype libass libpthreadstubs libuchardet luaEnv mujs ] ++ lib.optionals alsaSupport        [ alsa-lib ] ++ lib.optionals archiveSupport     [ libarchive ] ++ lib.optionals bluraySupport      [ libbluray ] ++ lib.optionals bs2bSupport        [ libbs2b ] ++ lib.optionals cacaSupport        [ libcaca ] ++ lib.optionals cddaSupport        [ libcdio libcdio-paranoia ] ++ lib.optionals cmsSupport         [ lcms2 ] ++ lib.optionals drmSupport         [ libdrm mesa ] ++ lib.optionals dvdnavSupport      [ libdvdnav libdvdnav.libdvdread ] ++ lib.optionals jackaudioSupport   [ libjack2 ] ++ lib.optionals libpngSupport      [ libpng ] ++ lib.optionals openalSupport      [ openalSoft ] ++ lib.optionals pulseSupport       [ libpulseaudio ] ++ lib.optionals rubberbandSupport  [ rubberband ] ++ lib.optionals screenSaverSupport [ libXScrnSaver ] ++ lib.optionals sdl2Support        [ SDL2 ] ++ lib.optionals sixelSupport       [ libsixel ] ++ lib.optionals speexSupport       [ speex ] ++ lib.optionals theoraSupport      [ libtheora ] ++ lib.optionals vaapiSupport       [ libva ] ++ lib.optionals vapoursynthSupport [ vapoursynth ] ++ lib.optionals vdpauSupport       [ libvdpau ] ++ lib.optionals vulkanSupport      [ libplacebo shaderc vulkan-headers vulkan-loader ] ++ lib.optionals waylandSupport     [ wayland wayland-protocols libxkbcommon ] ++ lib.optionals x11Support         [ libX11 libXext libGLU libGL libXxf86vm libXrandr ] ++ lib.optionals xineramaSupport    [ libXinerama ] ++ lib.optionals xvSupport          [ libXv ] ++ lib.optionals zimgSupport        [ zimg ] ++ lib.optionals stdenv.isLinux     [ nv-codec-headers ] ++ lib.optionals stdenv.isDarwin    [ libiconv ] ++ lib.optionals stdenv.isDarwin    [ CoreFoundation Cocoa CoreAudio MediaPlayer ]; </ins> enableParallelBuilding = true; <del> postBuild = optionalString stdenv.isDarwin '' </del> <ins> postBuild = lib.optionalString stdenv.isDarwin '' </ins> python3 TOOLS/osxbundle.py -s build/mpv '';

substituteInPlace $out/lib/pkgconfig/mpv.pc  --replace "$out/include" "$dev/include" <del> '' + optionalString stdenv.isDarwin '' </del> <ins> '' + lib.optionalString stdenv.isDarwin '' </ins> mkdir -p $out/Applications cp -r build/mpv.app $out/Applications ''; # Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found. # See the explanation in addOpenGLRunpath. <del> postFixup = optionalString stdenv.isLinux '' </del> <ins> postFixup = lib.optionalString stdenv.isLinux '' </ins> addOpenGLRunpath $out/bin/mpv ''; meta = with lib; { <del> description = "A media player that supports many video formats (MPlayer and mplayer2 fork)"; </del> homepage = "https://mpv.io"; <ins> description = "General-purpose media player, fork of MPlayer and mplayer2"; longDescription = '' mpv is a free and open-source general-purpose video player, based on the MPlayer and mplayer2 projects, with great improvements above both. ''; </ins> license = licenses.gpl2Plus; maintainers = with maintainers; [ AndersonTorres fpletz globin ma27 tadeokondrak ]; platforms = platforms.darwin ++ platforms.linux; <ins> }; </ins> <del> longDescription = '' mpv is a free and open-source general-purpose video player, based on the MPlayer and mplayer2 projects, with great improvements above both. ''; </del> <ins> passthru = { inherit # The wrapper consults luaEnv and lua.version luaEnv lua # In the wrapper, we want to reference vapoursynth which has the `python3` # passthru attribute (which has the `sitePrefix` attribute). This way we'll # be sure that in the wrapper we'll use the same python3.sitePrefix used to # build vapoursynth. vapoursynthSupport vapoursynth ; </ins> }; }

# Arguments that this derivation gets when it is created with `callPackage` { stdenv , lib <del> , symlinkJoin </del> , makeWrapper <ins> , symlinkJoin </ins> , yt-dlp }:

mpv: let <del> # arguments to the function (called `wrapMpv` in all-packages.nix) </del> <ins> # arguments to the function (exposed as `wrapMpv` in all-packages.nix) </ins> wrapper = { extraMakeWrapperArgs ? [], youtubeSupport ? true,