Change:
<del> { lib , config , stdenv , fetchFromGitHub , addOpenGLRunpath , bash , docutils , meson , ninja , pkg-config , python3 , ffmpeg , freefont_ttf , freetype , libass , libpthreadstubs , nv-codec-headers-11 , lua , libuchardet , libiconv , xcbuild , rcodesign </del> <ins> { lib, SDL2, addOpenGLRunpath, alsa-lib, bash, buildPackages, callPackage, config, darwin, docutils, fetchFromGitHub, ffmpeg, freefont_ttf, freetype, lcms2, libGL, libGLU, libX11, libXScrnSaver, libXext, libXinerama, libXpresent, libXrandr, libXv, libXxf86vm, libarchive, libass, libbluray, libbs2b, libcaca, libcdio, libcdio-paranoia, libdrm, libdvdnav, libiconv, libjack2, libplacebo, libpng, libpthreadstubs, libpulseaudio, libsixel, libtheora, libuchardet, libva, libvdpau, libxkbcommon, lua, mesa, meson, mujs, ninja, nv-codec-headers-11, openalSoft, pipewire, pkg-config, python3, rubberband, shaderc, # instead of spirv-cross speex, stdenv, swift, vapoursynth, vulkan-headers, vulkan-loader, wayland, wayland-protocols, wayland-scanner, xcbuild, zimg, </ins> <del> , waylandSupport ? stdenv.isLinux , wayland , wayland-protocols , wayland-scanner , libxkbcommon , x11Support ? stdenv.isLinux , libGLU, libGL , libX11 , libXext , libXxf86vm , libXrandr , libXpresent , cddaSupport ? false , libcdio , libcdio-paranoia , vulkanSupport ? stdenv.isLinux , libplacebo , shaderc # instead of spirv-cross , vulkan-headers , vulkan-loader , drmSupport ? stdenv.isLinux , libdrm , mesa , alsaSupport        ? stdenv.isLinux, alsa-lib , archiveSupport     ? true,           libarchive , bluraySupport      ? true,           libbluray , bs2bSupport        ? true,           libbs2b , cacaSupport        ? true,           libcaca , cmsSupport         ? true,           lcms2 , dvdnavSupport      ? stdenv.isLinux, libdvdnav , dvbinSupport       ? stdenv.isLinux , jackaudioSupport   ? false,          libjack2 , javascriptSupport  ? true,           mujs , libpngSupport      ? true,           libpng , openalSupport      ? true,           openalSoft , pulseSupport       ? config.pulseaudio or stdenv.isLinux, libpulseaudio , pipewireSupport    ? stdenv.isLinux, pipewire , rubberbandSupport  ? true,           rubberband , screenSaverSupport ? true,           libXScrnSaver , sdl2Support        ? true,           SDL2 , sixelSupport       ? false,          libsixel , speexSupport       ? true,           speex , swiftSupport       ? stdenv.isDarwin, swift , theoraSupport      ? true,           libtheora , vaapiSupport       ? x11Support || waylandSupport, libva , vapoursynthSupport ? false,          vapoursynth , vdpauSupport       ? true,           libvdpau , xineramaSupport    ? stdenv.isLinux, libXinerama , xvSupport          ? stdenv.isLinux, libXv , zimgSupport        ? true,           zimg , darwin </del> <ins> # Boolean alsaSupport ? stdenv.isLinux, archiveSupport ? true, bluraySupport ? true, bs2bSupport ? true, cacaSupport ? true, cddaSupport ? false, cmsSupport ? true, drmSupport ? stdenv.isLinux, dvbinSupport ? stdenv.isLinux, dvdnavSupport ? stdenv.isLinux, jackaudioSupport ? false, javascriptSupport ? true, libpngSupport ? true, openalSupport ? true, pipewireSupport ? stdenv.isLinux, pulseSupport ? config.pulseaudio or stdenv.isLinux, rubberbandSupport ? true, screenSaverSupport ? true, sdl2Support ? !stdenv.isDarwin, sixelSupport ? false, speexSupport ? true, swiftSupport ? stdenv.isDarwin, theoraSupport ? true, vaapiSupport ? x11Support || waylandSupport, vapoursynthSupport ? false, vdpauSupport ? true, vulkanSupport ? stdenv.isLinux, waylandSupport ? stdenv.isLinux, x11Support ? stdenv.isLinux, xineramaSupport ? stdenv.isLinux, xvSupport ? stdenv.isLinux, zimgSupport ? true, </ins> }: let inherit (darwin.apple_sdk_11_0.frameworks) <del> AVFoundation Accelerate Cocoa CoreAudio CoreFoundation CoreMedia MediaPlayer VideoToolbox; </del> <ins> AVFoundation Accelerate Cocoa CoreAudio CoreFoundation CoreMedia MediaPlayer VideoToolbox ; </ins> luaEnv = lua.withPackages (ps: with ps; [ luasocket ]); <del> overrideSDK = platform: version: platform // lib.optionalAttrs (platform ? darwinMinVersion) { </del> <ins> overrideSDK = platform: version: platform // lib.optionalAttrs (platform ? darwinMinVersion) { </ins> darwinMinVersion = version; }; <del> stdenv' = if swiftSupport && stdenv.isDarwin && stdenv.isx86_64 then stdenv.override (old: { buildPlatform = overrideSDK old.buildPlatform "10.15"; hostPlatform = overrideSDK old.hostPlatform "10.15"; targetPlatform = overrideSDK old.targetPlatform "10.15"; }) else stdenv; in stdenv'.mkDerivation (finalAttrs: { </del> <ins> stdenv' = if swiftSupport && stdenv.isDarwin && stdenv.isx86_64 then stdenv.override (old: { buildPlatform = overrideSDK old.buildPlatform "10.15"; hostPlatform = overrideSDK old.hostPlatform "10.15"; targetPlatform = overrideSDK old.targetPlatform "10.15"; }) else stdenv; in stdenv'.mkDerivation (finalAttrs: { </ins> pname = "mpv"; <del> version = "0.37.0"; </del> <ins> version = "0.38.0"; </ins> <del> outputs = [ "out" "dev" "doc" "man" ]; </del> <ins> outputs = [ "out" "dev" "doc" "man" ]; </ins> src = fetchFromGitHub { owner = "mpv-player"; repo = "mpv"; rev = "v${finalAttrs.version}"; <del> hash = "sha256-izAz9Iiam7tJAWIQkmn2cKOfoaog8oPKq4sOUtp1nvU="; </del> <ins> hash = "sha256-dFajnCpGlNqUv33A8eFEn8kjtzIPkcBY5j0gNVlaiIY="; </ins> }; <del> patches = [ ./darwin-sigtool-no-deep.patch ]; </del> <ins> patches = [ # Fix build with Darwin SDK 11 ./0001-fix-darwin-build.patch ]; </ins> postPatch = lib.concatStringsSep "n" [ # Don't reference compile time dependencies or create a build outputs cycle # between out and dev '' <del> substituteInPlace meson.build  --replace-fail "conf_data.set_quoted('CONFIGURATION', configuration)"  "conf_data.set_quoted('CONFIGURATION', '<ommited>')" </del> <ins> substituteInPlace meson.build  --replace-fail "conf_data.set_quoted('CONFIGURATION', configuration)"  "conf_data.set_quoted('CONFIGURATION', '<ommited>')" </ins> '' # A trick to patchShebang everything except mpv_identify.sh '' <del> pushd TOOLS mv mpv_identify.sh mpv_identify patchShebangs *.py *.sh mv mpv_identify mpv_identify.sh popd </del> <ins> pushd TOOLS mv mpv_identify.sh mpv_identify patchShebangs *.py *.sh mv mpv_identify mpv_identify.sh popd </ins> '' ];

Discussion:
Package name: Latest released version: <!-- Search your package here: --- Current version on the unstable channel: Current version on the stable/release channel: <!-- 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! --- Notify maintainers <!-- If the result shows no maintainers, tag the person that last updated the package. --Note for maintainers: Please tag this issue in your PR. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
Yeeessaah!