lol

Merge pull request #304349 from atorres1985-contrib/mpv

mpv: 0.37.0 -> 0.38.0

authored by

Mario Rodas and committed by
GitHub
c95c1a56 16cb1f38

+345 -239
+29
pkgs/applications/video/mpv/0001-fix-darwin-build.patch
··· 1 + --- a/osdep/mac/input_helper.swift 2 + +++ b/osdep/mac/input_helper.swift 3 + @@ -18,6 +18,14 @@ 4 + import Cocoa 5 + import Carbon.HIToolbox 6 + 7 + +extension NSCondition { 8 + + fileprivate func withLock<T>(_ body: () throws -> T) rethrows -> T { 9 + + self.lock() 10 + + defer { self.unlock() } 11 + + return try body() 12 + + } 13 + +} 14 + + 15 + class InputHelper: NSObject { 16 + var option: OptionHelper? 17 + var lock = NSCondition() 18 + --- a/audio/out/ao_avfoundation.m 19 + +++ b/audio/out/ao_avfoundation.m 20 + @@ -312,7 +312,8 @@ 21 + 22 + + #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000 23 + p->observer = [[AVObserver alloc] initWithAO:ao]; 24 + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; 25 + [center addObserver:p->observer selector:@selector(handleRestartNotification:) name:AVSampleBufferAudioRendererOutputConfigurationDidChangeNotification object:p->renderer]; 26 + [center addObserver:p->observer selector:@selector(handleRestartNotification:) name:AVSampleBufferAudioRendererWasFlushedAutomaticallyNotification object:p->renderer]; 27 + - 28 + + #endif 29 + return CONTROL_OK;
-13
pkgs/applications/video/mpv/darwin-sigtool-no-deep.patch
··· 1 - diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py 2 - index 98699e478b..d02ecf610e 100755 3 - --- a/TOOLS/osxbundle.py 4 - +++ b/TOOLS/osxbundle.py 5 - @@ -39,7 +39,7 @@ def apply_plist_template(plist_file, version): 6 - print(line.rstrip().replace('${VERSION}', version)) 7 - 8 - def sign_bundle(binary_name): 9 - - sh('codesign --force --deep -s - ' + bundle_path(binary_name)) 10 - + sh('rcodesign sign ' + bundle_path(binary_name)) 11 - 12 - def bundle_version(): 13 - if os.path.exists('VERSION'):
+297 -200
pkgs/applications/video/mpv/default.nix
··· 1 - { lib 2 - , config 3 - , stdenv 4 - , fetchFromGitHub 5 - , addOpenGLRunpath 6 - , bash 7 - , docutils 8 - , meson 9 - , ninja 10 - , pkg-config 11 - , python3 12 - , ffmpeg 13 - , freefont_ttf 14 - , freetype 15 - , libass 16 - , libpthreadstubs 17 - , nv-codec-headers-11 18 - , lua 19 - , libuchardet 20 - , libiconv 21 - , xcbuild 22 - , rcodesign 1 + { 2 + lib, 3 + SDL2, 4 + addOpenGLRunpath, 5 + alsa-lib, 6 + bash, 7 + buildPackages, 8 + callPackage, 9 + config, 10 + darwin, 11 + docutils, 12 + fetchFromGitHub, 13 + ffmpeg, 14 + freefont_ttf, 15 + freetype, 16 + lcms2, 17 + libGL, 18 + libGLU, 19 + libX11, 20 + libXScrnSaver, 21 + libXext, 22 + libXinerama, 23 + libXpresent, 24 + libXrandr, 25 + libXv, 26 + libXxf86vm, 27 + libarchive, 28 + libass, 29 + libbluray, 30 + libbs2b, 31 + libcaca, 32 + libcdio, 33 + libcdio-paranoia, 34 + libdrm, 35 + libdvdnav, 36 + libiconv, 37 + libjack2, 38 + libplacebo, 39 + libpng, 40 + libpthreadstubs, 41 + libpulseaudio, 42 + libsixel, 43 + libtheora, 44 + libuchardet, 45 + libva, 46 + libvdpau, 47 + libxkbcommon, 48 + lua, 49 + mesa, 50 + meson, 51 + mujs, 52 + ninja, 53 + nv-codec-headers-11, 54 + openalSoft, 55 + pipewire, 56 + pkg-config, 57 + python3, 58 + rubberband, 59 + shaderc, # instead of spirv-cross 60 + speex, 61 + stdenv, 62 + swift, 63 + vapoursynth, 64 + vulkan-headers, 65 + vulkan-loader, 66 + wayland, 67 + wayland-protocols, 68 + wayland-scanner, 69 + xcbuild, 70 + zimg, 23 71 24 - , waylandSupport ? stdenv.isLinux 25 - , wayland 26 - , wayland-protocols 27 - , wayland-scanner 28 - , libxkbcommon 29 - 30 - , x11Support ? stdenv.isLinux 31 - , libGLU, libGL 32 - , libX11 33 - , libXext 34 - , libXxf86vm 35 - , libXrandr 36 - , libXpresent 37 - 38 - , cddaSupport ? false 39 - , libcdio 40 - , libcdio-paranoia 41 - 42 - , vulkanSupport ? stdenv.isLinux 43 - , libplacebo 44 - , shaderc # instead of spirv-cross 45 - , vulkan-headers 46 - , vulkan-loader 47 - 48 - , drmSupport ? stdenv.isLinux 49 - , libdrm 50 - , mesa 51 - 52 - , alsaSupport ? stdenv.isLinux, alsa-lib 53 - , archiveSupport ? true, libarchive 54 - , bluraySupport ? true, libbluray 55 - , bs2bSupport ? true, libbs2b 56 - , cacaSupport ? true, libcaca 57 - , cmsSupport ? true, lcms2 58 - , dvdnavSupport ? stdenv.isLinux, libdvdnav 59 - , dvbinSupport ? stdenv.isLinux 60 - , jackaudioSupport ? false, libjack2 61 - , javascriptSupport ? true, mujs 62 - , libpngSupport ? true, libpng 63 - , openalSupport ? true, openalSoft 64 - , pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio 65 - , pipewireSupport ? stdenv.isLinux, pipewire 66 - , rubberbandSupport ? true, rubberband 67 - , screenSaverSupport ? true, libXScrnSaver 68 - , sdl2Support ? true, SDL2 69 - , sixelSupport ? false, libsixel 70 - , speexSupport ? true, speex 71 - , swiftSupport ? stdenv.isDarwin, swift 72 - , theoraSupport ? true, libtheora 73 - , vaapiSupport ? x11Support || waylandSupport, libva 74 - , vapoursynthSupport ? false, vapoursynth 75 - , vdpauSupport ? true, libvdpau 76 - , xineramaSupport ? stdenv.isLinux, libXinerama 77 - , xvSupport ? stdenv.isLinux, libXv 78 - , zimgSupport ? true, zimg 79 - , darwin 72 + # Boolean 73 + alsaSupport ? stdenv.isLinux, 74 + archiveSupport ? true, 75 + bluraySupport ? true, 76 + bs2bSupport ? true, 77 + cacaSupport ? true, 78 + cddaSupport ? false, 79 + cmsSupport ? true, 80 + drmSupport ? stdenv.isLinux, 81 + dvbinSupport ? stdenv.isLinux, 82 + dvdnavSupport ? stdenv.isLinux, 83 + jackaudioSupport ? false, 84 + javascriptSupport ? true, 85 + libpngSupport ? true, 86 + openalSupport ? true, 87 + pipewireSupport ? stdenv.isLinux, 88 + pulseSupport ? config.pulseaudio or stdenv.isLinux, 89 + rubberbandSupport ? true, 90 + screenSaverSupport ? true, 91 + sdl2Support ? !stdenv.isDarwin, 92 + sixelSupport ? false, 93 + speexSupport ? true, 94 + swiftSupport ? stdenv.isDarwin, 95 + theoraSupport ? true, 96 + vaapiSupport ? x11Support || waylandSupport, 97 + vapoursynthSupport ? false, 98 + vdpauSupport ? true, 99 + vulkanSupport ? stdenv.isLinux, 100 + waylandSupport ? stdenv.isLinux, 101 + x11Support ? stdenv.isLinux, 102 + xineramaSupport ? stdenv.isLinux, 103 + xvSupport ? stdenv.isLinux, 104 + zimgSupport ? true, 80 105 }: 81 106 82 107 let 83 108 inherit (darwin.apple_sdk_11_0.frameworks) 84 - AVFoundation Accelerate Cocoa CoreAudio CoreFoundation CoreMedia 85 - MediaPlayer VideoToolbox; 109 + AVFoundation 110 + Accelerate 111 + Cocoa 112 + CoreAudio 113 + CoreFoundation 114 + CoreMedia 115 + MediaPlayer 116 + VideoToolbox 117 + ; 86 118 luaEnv = lua.withPackages (ps: with ps; [ luasocket ]); 87 119 88 - overrideSDK = platform: version: 89 - platform // lib.optionalAttrs (platform ? darwinMinVersion) { 120 + overrideSDK = 121 + platform: version: 122 + platform 123 + // lib.optionalAttrs (platform ? darwinMinVersion) { 90 124 darwinMinVersion = version; 91 125 }; 92 126 93 - stdenv' = if swiftSupport && stdenv.isDarwin && stdenv.isx86_64 94 - then stdenv.override (old: { 95 - buildPlatform = overrideSDK old.buildPlatform "10.15"; 96 - hostPlatform = overrideSDK old.hostPlatform "10.15"; 97 - targetPlatform = overrideSDK old.targetPlatform "10.15"; 98 - }) 99 - else stdenv; 100 - in stdenv'.mkDerivation (finalAttrs: { 127 + stdenv' = 128 + if swiftSupport && stdenv.isDarwin && stdenv.isx86_64 then 129 + stdenv.override (old: { 130 + buildPlatform = overrideSDK old.buildPlatform "10.15"; 131 + hostPlatform = overrideSDK old.hostPlatform "10.15"; 132 + targetPlatform = overrideSDK old.targetPlatform "10.15"; 133 + }) 134 + else 135 + stdenv; 136 + in 137 + stdenv'.mkDerivation (finalAttrs: { 101 138 pname = "mpv"; 102 - version = "0.37.0"; 139 + version = "0.38.0"; 103 140 104 - outputs = [ "out" "dev" "doc" "man" ]; 141 + outputs = [ 142 + "out" 143 + "dev" 144 + "doc" 145 + "man" 146 + ]; 105 147 106 148 src = fetchFromGitHub { 107 149 owner = "mpv-player"; 108 150 repo = "mpv"; 109 151 rev = "v${finalAttrs.version}"; 110 - hash = "sha256-izAz9Iiam7tJAWIQkmn2cKOfoaog8oPKq4sOUtp1nvU="; 152 + hash = "sha256-dFajnCpGlNqUv33A8eFEn8kjtzIPkcBY5j0gNVlaiIY="; 111 153 }; 112 154 113 - patches = [ ./darwin-sigtool-no-deep.patch ]; 155 + patches = [ 156 + # Fix build with Darwin SDK 11 157 + ./0001-fix-darwin-build.patch 158 + ]; 114 159 115 160 postPatch = lib.concatStringsSep "\n" [ 116 161 # Don't reference compile time dependencies or create a build outputs cycle 117 162 # between out and dev 118 163 '' 119 - substituteInPlace meson.build \ 120 - --replace-fail "conf_data.set_quoted('CONFIGURATION', configuration)" \ 121 - "conf_data.set_quoted('CONFIGURATION', '<ommited>')" 164 + substituteInPlace meson.build \ 165 + --replace-fail "conf_data.set_quoted('CONFIGURATION', configuration)" \ 166 + "conf_data.set_quoted('CONFIGURATION', '<ommited>')" 122 167 '' 123 168 # A trick to patchShebang everything except mpv_identify.sh 124 169 '' 125 - pushd TOOLS 126 - mv mpv_identify.sh mpv_identify 127 - patchShebangs *.py *.sh 128 - mv mpv_identify mpv_identify.sh 129 - popd 170 + pushd TOOLS 171 + mv mpv_identify.sh mpv_identify 172 + patchShebangs *.py *.sh 173 + mv mpv_identify mpv_identify.sh 174 + popd 130 175 '' 131 176 ]; 132 177 ··· 135 180 export SWIFT_LIB_DYNAMIC="${lib.getLib swift.swift}/lib/swift/macosx" 136 181 ''; 137 182 138 - mesonFlags = [ 139 - (lib.mesonOption "default_library" "shared") 140 - (lib.mesonBool "libmpv" true) 141 - (lib.mesonEnable "libarchive" archiveSupport) 142 - (lib.mesonEnable "manpage-build" true) 143 - (lib.mesonEnable "cdda" cddaSupport) 144 - (lib.mesonEnable "dvbin" dvbinSupport) 145 - (lib.mesonEnable "dvdnav" dvdnavSupport) 146 - (lib.mesonEnable "openal" openalSupport) 147 - (lib.mesonEnable "sdl2" sdl2Support) 148 - # Disable whilst Swift isn't supported 149 - (lib.mesonEnable "swift-build" swiftSupport) 150 - (lib.mesonEnable "macos-cocoa-cb" swiftSupport) 151 - ] ++ lib.optionals stdenv.isDarwin [ 152 - # Toggle explicitly because it fails on darwin 153 - (lib.mesonEnable "videotoolbox-pl" vulkanSupport) 154 - ]; 183 + mesonFlags = 184 + [ 185 + (lib.mesonOption "default_library" "shared") 186 + (lib.mesonBool "libmpv" true) 187 + (lib.mesonEnable "libarchive" archiveSupport) 188 + (lib.mesonEnable "manpage-build" true) 189 + (lib.mesonEnable "cdda" cddaSupport) 190 + (lib.mesonEnable "dvbin" dvbinSupport) 191 + (lib.mesonEnable "dvdnav" dvdnavSupport) 192 + (lib.mesonEnable "openal" openalSupport) 193 + (lib.mesonEnable "sdl2" sdl2Support) 194 + # Disable whilst Swift isn't supported 195 + (lib.mesonEnable "swift-build" swiftSupport) 196 + (lib.mesonEnable "macos-cocoa-cb" swiftSupport) 197 + ] 198 + ++ lib.optionals stdenv.isDarwin [ 199 + # Toggle explicitly because it fails on darwin 200 + (lib.mesonEnable "videotoolbox-pl" vulkanSupport) 201 + ]; 155 202 156 203 mesonAutoFeatures = "auto"; 157 204 158 - nativeBuildInputs = [ 159 - addOpenGLRunpath 160 - docutils # for rst2man 161 - meson 162 - ninja 163 - pkg-config 164 - ] 165 - ++ lib.optionals stdenv.isDarwin [ xcbuild.xcrun rcodesign ] 166 - ++ lib.optionals swiftSupport [ swift ] 167 - ++ lib.optionals waylandSupport [ wayland-scanner ]; 205 + nativeBuildInputs = 206 + [ 207 + addOpenGLRunpath 208 + docutils # for rst2man 209 + meson 210 + ninja 211 + pkg-config 212 + ] 213 + ++ lib.optionals stdenv.isDarwin [ 214 + buildPackages.darwin.sigtool 215 + xcbuild.xcrun 216 + ] 217 + ++ lib.optionals swiftSupport [ swift ] 218 + ++ lib.optionals waylandSupport [ wayland-scanner ]; 168 219 169 - buildInputs = [ 170 - bash 171 - ffmpeg 172 - freetype 173 - libass 174 - libplacebo 175 - libpthreadstubs 176 - libuchardet 177 - luaEnv 178 - python3 179 - ] ++ lib.optionals alsaSupport [ alsa-lib ] 180 - ++ lib.optionals archiveSupport [ libarchive ] 181 - ++ lib.optionals bluraySupport [ libbluray ] 182 - ++ lib.optionals bs2bSupport [ libbs2b ] 183 - ++ lib.optionals cacaSupport [ libcaca ] 184 - ++ lib.optionals cddaSupport [ libcdio libcdio-paranoia ] 185 - ++ lib.optionals cmsSupport [ lcms2 ] 186 - ++ lib.optionals drmSupport [ libdrm mesa ] 187 - ++ lib.optionals dvdnavSupport [ libdvdnav libdvdnav.libdvdread ] 188 - ++ lib.optionals jackaudioSupport [ libjack2 ] 189 - ++ lib.optionals javascriptSupport [ mujs ] 190 - ++ lib.optionals libpngSupport [ libpng ] 191 - ++ lib.optionals openalSupport [ openalSoft ] 192 - ++ lib.optionals pipewireSupport [ pipewire ] 193 - ++ lib.optionals pulseSupport [ libpulseaudio ] 194 - ++ lib.optionals rubberbandSupport [ rubberband ] 220 + buildInputs = 221 + [ 222 + bash 223 + ffmpeg 224 + freetype 225 + libass 226 + libplacebo 227 + libpthreadstubs 228 + libuchardet 229 + luaEnv 230 + python3 231 + ] 232 + ++ lib.optionals alsaSupport [ alsa-lib ] 233 + ++ lib.optionals archiveSupport [ libarchive ] 234 + ++ lib.optionals bluraySupport [ libbluray ] 235 + ++ lib.optionals bs2bSupport [ libbs2b ] 236 + ++ lib.optionals cacaSupport [ libcaca ] 237 + ++ lib.optionals cddaSupport [ 238 + libcdio 239 + libcdio-paranoia 240 + ] 241 + ++ lib.optionals cmsSupport [ lcms2 ] 242 + ++ lib.optionals drmSupport [ 243 + libdrm 244 + mesa 245 + ] 246 + ++ lib.optionals dvdnavSupport [ 247 + libdvdnav 248 + libdvdnav.libdvdread 249 + ] 250 + ++ lib.optionals jackaudioSupport [ libjack2 ] 251 + ++ lib.optionals javascriptSupport [ mujs ] 252 + ++ lib.optionals libpngSupport [ libpng ] 253 + ++ lib.optionals openalSupport [ openalSoft ] 254 + ++ lib.optionals pipewireSupport [ pipewire ] 255 + ++ lib.optionals pulseSupport [ libpulseaudio ] 256 + ++ lib.optionals rubberbandSupport [ rubberband ] 195 257 ++ lib.optionals screenSaverSupport [ libXScrnSaver ] 196 - ++ lib.optionals sdl2Support [ SDL2 ] 197 - ++ lib.optionals sixelSupport [ libsixel ] 198 - ++ lib.optionals speexSupport [ speex ] 199 - ++ lib.optionals theoraSupport [ libtheora ] 200 - ++ lib.optionals vaapiSupport [ libva ] 258 + ++ lib.optionals sdl2Support [ SDL2 ] 259 + ++ lib.optionals sixelSupport [ libsixel ] 260 + ++ lib.optionals speexSupport [ speex ] 261 + ++ lib.optionals theoraSupport [ libtheora ] 262 + ++ lib.optionals vaapiSupport [ libva ] 201 263 ++ lib.optionals vapoursynthSupport [ vapoursynth ] 202 - ++ lib.optionals vdpauSupport [ libvdpau ] 203 - ++ lib.optionals vulkanSupport [ shaderc vulkan-headers vulkan-loader ] 204 - ++ lib.optionals waylandSupport [ wayland wayland-protocols libxkbcommon ] 205 - ++ lib.optionals x11Support [ libX11 libXext libGLU libGL libXxf86vm libXrandr libXpresent ] 206 - ++ lib.optionals xineramaSupport [ libXinerama ] 207 - ++ lib.optionals xvSupport [ libXv ] 208 - ++ lib.optionals zimgSupport [ zimg ] 209 - ++ lib.optionals stdenv.isLinux [ nv-codec-headers-11 ] 210 - ++ lib.optionals stdenv.isDarwin [ libiconv ] 211 - ++ lib.optionals stdenv.isDarwin [ Accelerate CoreFoundation Cocoa CoreAudio MediaPlayer VideoToolbox ] 212 - ++ lib.optionals (stdenv.isDarwin && swiftSupport) [ AVFoundation CoreMedia ]; 264 + ++ lib.optionals vdpauSupport [ libvdpau ] 265 + ++ lib.optionals vulkanSupport [ 266 + shaderc 267 + vulkan-headers 268 + vulkan-loader 269 + ] 270 + ++ lib.optionals waylandSupport [ 271 + wayland 272 + wayland-protocols 273 + libxkbcommon 274 + ] 275 + ++ lib.optionals x11Support [ 276 + libX11 277 + libXext 278 + libGLU 279 + libGL 280 + libXxf86vm 281 + libXrandr 282 + libXpresent 283 + ] 284 + ++ lib.optionals xineramaSupport [ libXinerama ] 285 + ++ lib.optionals xvSupport [ libXv ] 286 + ++ lib.optionals zimgSupport [ zimg ] 287 + ++ lib.optionals stdenv.isLinux [ nv-codec-headers-11 ] 288 + ++ lib.optionals stdenv.isDarwin [ libiconv ] 289 + ++ lib.optionals stdenv.isDarwin [ 290 + Accelerate 291 + CoreFoundation 292 + Cocoa 293 + CoreAudio 294 + MediaPlayer 295 + VideoToolbox 296 + ] 297 + ++ lib.optionals (stdenv.isDarwin && swiftSupport) [ 298 + AVFoundation 299 + CoreMedia 300 + ]; 213 301 214 302 postBuild = lib.optionalString stdenv.isDarwin '' 215 303 pushd .. # Must be run from the source dir because it uses relative paths ··· 217 305 popd 218 306 ''; 219 307 220 - postInstall = '' 221 - # Use a standard font 222 - mkdir -p $out/share/mpv 223 - ln -s ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mpv/subfont.ttf 308 + postInstall = 309 + '' 310 + # Use a standard font 311 + mkdir -p $out/share/mpv 312 + ln -s ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mpv/subfont.ttf 224 313 225 - pushd ../TOOLS 226 - cp mpv_identify.sh umpv $out/bin/ 227 - popd 228 - pushd $out/share/applications 314 + pushd ../TOOLS 315 + cp mpv_identify.sh umpv $out/bin/ 316 + popd 317 + pushd $out/share/applications 229 318 230 - # patch out smb protocol reference, since our ffmpeg can't handle it 231 - substituteInPlace mpv.desktop --replace-fail "smb," "" 319 + # patch out smb protocol reference, since our ffmpeg can't handle it 320 + substituteInPlace mpv.desktop --replace-fail "smb," "" 232 321 233 - sed -e '/Icon=/ ! s|mpv|umpv|g; s|^Exec=.*|Exec=umpv %U|' \ 234 - mpv.desktop > umpv.desktop 235 - printf "NoDisplay=true\n" >> umpv.desktop 236 - popd 237 - '' + lib.optionalString stdenv.isDarwin '' 238 - mkdir -p $out/Applications 239 - cp -r mpv.app $out/Applications 240 - ''; 322 + sed -e '/Icon=/ ! s|mpv|umpv|g; s|^Exec=.*|Exec=umpv %U|' \ 323 + mpv.desktop > umpv.desktop 324 + printf "NoDisplay=true\n" >> umpv.desktop 325 + popd 326 + '' 327 + + lib.optionalString stdenv.isDarwin '' 328 + mkdir -p $out/Applications 329 + cp -r mpv.app $out/Applications 330 + ''; 241 331 242 332 # Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found. 243 333 # See the explanation in addOpenGLRunpath. ··· 248 338 249 339 passthru = { 250 340 inherit 251 - # The wrapper consults luaEnv and lua.version 252 - luaEnv 253 - lua 254 - # In the wrapper, we want to reference vapoursynth which has the `python3` 255 - # passthru attribute (which has the `sitePrefix` attribute). This way we'll 256 - # be sure that in the wrapper we'll use the same python3.sitePrefix used to 257 - # build vapoursynth. 258 - vapoursynthSupport 259 - vapoursynth 260 - ; 341 + # The wrapper consults luaEnv and lua.version 342 + luaEnv 343 + lua 344 + # In the wrapper, we want to reference vapoursynth which has the `python3` 345 + # passthru attribute (which has the `sitePrefix` attribute). This way we'll 346 + # be sure that in the wrapper we'll use the same python3.sitePrefix used to 347 + # build vapoursynth. 348 + vapoursynthSupport 349 + vapoursynth 350 + ; 351 + 352 + wrapper = callPackage ./wrapper.nix { }; 353 + scripts = callPackage ./scripts { }; 261 354 }; 262 355 263 356 meta = { ··· 271 364 license = lib.licenses.gpl2Plus; 272 365 mainProgram = "mpv"; 273 366 maintainers = with lib.maintainers; [ 274 - AndersonTorres fpletz globin ma27 tadeokondrak 367 + AndersonTorres 368 + fpletz 369 + globin 370 + ma27 371 + tadeokondrak 275 372 ]; 276 373 platforms = lib.platforms.unix; 277 374 };
+10 -8
pkgs/applications/video/mpv/wrapper.nix
··· 7 7 , symlinkJoin 8 8 , writeTextDir 9 9 , yt-dlp 10 + # the unwrapped mpv derivation 11 + , mpv 10 12 }: 11 - 12 - # the unwrapped mpv derivation - 1st argument to `wrapMpv` 13 - mpv: 14 13 15 14 let 16 - # arguments to the function (exposed as `wrapMpv` in all-packages.nix) 15 + # arguments to the function (exposed as `mpv-unwrapped.wrapper` in top-level) 17 16 wrapper = { 17 + mpv, 18 18 extraMakeWrapperArgs ? [], 19 19 youtubeSupport ? true, 20 - # a set of derivations (probably from `mpvScripts`) where each is 21 - # expected to have a `scriptName` passthru attribute that points to the 22 - # name of the script that would reside in the script's derivation's 20 + # a set of derivations (probably from `mpvScripts`) where each is expected 21 + # to have a `scriptName` passthru attribute that points to the name of the 22 + # script that would reside in the script's derivation's 23 23 # `$out/share/mpv/scripts/`. 24 - # A script can optionally also provide an `extraWrapperArgs` passthru attribute. 24 + # 25 + # A script can optionally also provide `passthru.extraWrapperArgs` 26 + # attribute. 25 27 scripts ? [], 26 28 extraUmpvWrapperArgs ? [] 27 29 }:
+4 -12
pkgs/by-name/sv/svp/mpv.nix
··· 1 1 { lib 2 2 , mpv-unwrapped 3 - , wrapMpv 4 3 , ocl-icd 5 4 , ... 6 5 }: 7 - let 8 - libraries = [ 9 - ocl-icd 10 - ]; 11 - in 12 - wrapMpv 13 - (mpv-unwrapped.override { 14 - vapoursynthSupport = true; 15 - }) 16 - { 6 + 7 + mpv-unwrapped.wrapper { 8 + mpv = mpv-unwrapped.override { vapoursynthSupport = true; }; 17 9 extraMakeWrapperArgs = [ 18 10 # Add paths to required libraries 19 11 "--prefix" 20 12 "LD_LIBRARY_PATH" 21 13 ":" 22 - "/run/opengl-driver/lib:${lib.makeLibraryPath libraries}" 14 + "/run/opengl-driver/lib:${lib.makeLibraryPath [ ocl-icd ]}" 23 15 ]; 24 16 }
+5 -6
pkgs/top-level/all-packages.nix
··· 32938 32938 inherit lua; 32939 32939 }; 32940 32940 32941 + # Wrap avoiding rebuild 32942 + mpv = mpv-unwrapped.wrapper { mpv = mpv-unwrapped; }; 32943 + 32944 + mpvScripts = mpv-unwrapped.scripts; 32945 + 32941 32946 shaka-packager = callPackage ../applications/video/shaka-packager { }; 32942 32947 32943 - # Wraps without triggering a rebuild 32944 - wrapMpv = callPackage ../applications/video/mpv/wrapper.nix { }; 32945 - mpv = wrapMpv mpv-unwrapped { }; 32946 - 32947 32948 mpvpaper = callPackage ../tools/wayland/mpvpaper { }; 32948 - 32949 - mpvScripts = callPackage ../applications/video/mpv/scripts { }; 32950 32949 32951 32950 open-in-mpv = callPackage ../applications/video/open-in-mpv { }; 32952 32951