mpv: 0.36.0 -> 0.37.0

And some refactors:
- Remove dev output (cycle detected in build of <mpv> in the references of
output 'dev' from output 'out')
- Env vars inside env
- Remove nested with

+33 -31
+32 -30
pkgs/applications/video/mpv/default.nix
··· 1 - { config 2 - , lib 1 + { lib 2 + , config 3 3 , stdenv 4 4 , fetchFromGitHub 5 5 , fetchpatch ··· 82 82 83 83 let 84 84 inherit (darwin.apple_sdk_11_0.frameworks) 85 - AVFoundation CoreFoundation CoreMedia Cocoa CoreAudio MediaPlayer Accelerate; 85 + AVFoundation Accelerate Cocoa CoreAudio CoreFoundation CoreMedia 86 + MediaPlayer; 86 87 luaEnv = lua.withPackages (ps: with ps; [ luasocket ]); 87 88 88 89 overrideSDK = platform: version: ··· 99 100 else stdenv; 100 101 in stdenv'.mkDerivation (finalAttrs: { 101 102 pname = "mpv"; 102 - version = "0.36.0"; 103 + version = "0.37.0"; 103 104 104 - outputs = [ "out" "dev" "man" ]; 105 + outputs = [ "out" "doc" "man" ]; 105 106 106 107 src = fetchFromGitHub { 107 108 owner = "mpv-player"; 108 109 repo = "mpv"; 109 110 rev = "v${finalAttrs.version}"; 110 - hash = "sha256-82moFbWvfc1awXih0d0D+dHqYbIoGNZ77RmafQ80IOY="; 111 + hash = "sha256-izAz9Iiam7tJAWIQkmn2cKOfoaog8oPKq4sOUtp1nvU="; 111 112 }; 112 113 113 - patches = [ 114 - # Revert "meson: use the new build_options method" to avoid a 115 - # cycle between the out and dev outputs. 116 - (fetchpatch { 117 - url = "https://github.com/mpv-player/mpv/commit/3c1686488b48bd2760e9b19f42e7d3be1363d00a.patch"; 118 - hash = "sha256-eYXfX8Y08q4Bl41VHBpwbxYRMZgm/iziXeK6AOp8O6I="; 119 - revert = true; 120 - }) 121 - ]; 114 + env.NIX_LDFLAGS = lib.optionalString x11Support "-lX11 -lXext "; 122 115 116 + # A trick to patchShebang everything except mpv_identify.sh 123 117 postPatch = '' 124 - patchShebangs version.* ./TOOLS/ 118 + pushd TOOLS 119 + mv mpv_identify.sh mpv_identify 120 + patchShebangs *.py *.sh 121 + mv mpv_identify mpv_identify.sh 122 + popd 125 123 ''; 126 124 127 - NIX_LDFLAGS = lib.optionalString x11Support "-lX11 -lXext "; 128 - 125 + # Ensure we reference 'lib' (not 'out') of Swift. 129 126 preConfigure = lib.optionalString swiftSupport '' 130 - # Ensure we reference 'lib' (not 'out') of Swift. 131 - export SWIFT_LIB_DYNAMIC=${lib.getLib swift.swift}/lib/swift/macosx 127 + export SWIFT_LIB_DYNAMIC="${lib.getLib swift.swift}/lib/swift/macosx" 132 128 ''; 133 129 134 130 mesonFlags = [ ··· 206 202 postBuild = lib.optionalString stdenv.isDarwin '' 207 203 pushd .. # Must be run from the source dir because it uses relative paths 208 204 python3 TOOLS/osxbundle.py -s build/mpv 209 - # Swap binary and bundle symlink to sign bundle executable as symlinks cannot be signed 205 + # Swap binary and bundle symlink to sign bundle executable as symlinks 206 + # cannot be signed 210 207 rm build/mpv.app/Contents/MacOS/mpv-bundle 211 208 mv build/mpv.app/Contents/MacOS/mpv build/mpv.app/Contents/MacOS/mpv-bundle 212 209 ln -s mpv-bundle build/mpv.app/Contents/MacOS/mpv ··· 219 216 mkdir -p $out/share/mpv 220 217 ln -s ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mpv/subfont.ttf 221 218 222 - cp ../TOOLS/mpv_identify.sh $out/bin 223 - cp ../TOOLS/umpv $out/bin 224 - cp $out/share/applications/mpv.desktop $out/share/applications/umpv.desktop 225 - sed -i '/Icon=/ ! s/mpv/umpv/g; s/^Exec=.*/Exec=umpv %U/' $out/share/applications/umpv.desktop 226 - printf "NoDisplay=true\n" >> $out/share/applications/umpv.desktop 219 + pushd ../TOOLS 220 + cp mpv_identify.sh umpv $out/bin/ 221 + popd 222 + pushd $out/share/applications 223 + sed -e '/Icon=/ ! s|mpv|umpv|g; s|^Exec=.*|Exec=umpv %U|' \ 224 + mpv.desktop > umpv.desktop 225 + printf "NoDisplay=true\n" >> umpv.desktop 226 + popd 227 227 '' + lib.optionalString stdenv.isDarwin '' 228 228 mkdir -p $out/Applications 229 229 cp -r mpv.app $out/Applications ··· 250 250 ; 251 251 }; 252 252 253 - meta = with lib; { 253 + meta = { 254 254 homepage = "https://mpv.io"; 255 255 description = "General-purpose media player, fork of MPlayer and mplayer2"; 256 256 longDescription = '' ··· 258 258 MPlayer and mplayer2 projects, with great improvements above both. 259 259 ''; 260 260 changelog = "https://github.com/mpv-player/mpv/releases/tag/v${finalAttrs.version}"; 261 - license = licenses.gpl2Plus; 261 + license = lib.licenses.gpl2Plus; 262 262 mainProgram = "mpv"; 263 - maintainers = with maintainers; [ AndersonTorres fpletz globin ma27 tadeokondrak ]; 264 - platforms = platforms.unix; 263 + maintainers = with lib.maintainers; [ 264 + AndersonTorres fpletz globin ma27 tadeokondrak 265 + ]; 266 + platforms = lib.platforms.unix; 265 267 }; 266 268 })
+1 -1
pkgs/top-level/all-packages.nix
··· 33765 33765 mpv-unwrapped = darwin.apple_sdk_11_0.callPackage ../applications/video/mpv { 33766 33766 stdenv = if stdenv.isDarwin then swiftPackages.stdenv else stdenv; 33767 33767 inherit lua; 33768 - inherit (darwin) sigtool; 33768 + inherit (darwin) sigtool; # otherwise it breaks splicing... 33769 33769 }; 33770 33770 33771 33771 shaka-packager = callPackage ../applications/video/shaka-packager { };