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