mpv: fix app-bundling

authored by David Knaack and committed by Anderson Torres ce6ca5eb 3d1ef6d3

+16 -7
+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('codesign --force -s - ' + bundle_path(binary_name)) 11 + 12 + def bundle_version(): 13 + if os.path.exists('VERSION'):
+2 -6
pkgs/applications/video/mpv/default.nix
··· 113 113 114 114 env.NIX_LDFLAGS = lib.optionalString x11Support "-lX11 -lXext "; 115 115 116 + patches = [ ./darwin-sigtool-no-deep.patch ]; 117 + 116 118 # A trick to patchShebang everything except mpv_identify.sh 117 119 postPatch = '' 118 120 pushd TOOLS ··· 206 208 postBuild = lib.optionalString stdenv.isDarwin '' 207 209 pushd .. # Must be run from the source dir because it uses relative paths 208 210 python3 TOOLS/osxbundle.py -s build/mpv 209 - # Swap binary and bundle symlink to sign bundle executable as symlinks 210 - # cannot be signed 211 - rm build/mpv.app/Contents/MacOS/mpv-bundle 212 - mv build/mpv.app/Contents/MacOS/mpv build/mpv.app/Contents/MacOS/mpv-bundle 213 - ln -s mpv-bundle build/mpv.app/Contents/MacOS/mpv 214 - codesign --force --sign - build/mpv.app/Contents/MacOS/mpv-bundle 215 211 popd 216 212 ''; 217 213
+1 -1
pkgs/applications/video/mpv/wrapper.nix
··· 97 97 '' + lib.optionalString stdenv.isDarwin '' 98 98 # wrapProgram can't operate on symlinks 99 99 rm "$out/Applications/mpv.app/Contents/MacOS/mpv" 100 - makeWrapper "${mpv}/Applications/mpv.app/Contents/MacOS/mpv-bundle" "$out/Applications/mpv.app/Contents/MacOS/mpv" ${mostMakeWrapperArgs} 100 + makeWrapper "${mpv}/Applications/mpv.app/Contents/MacOS/mpv" "$out/Applications/mpv.app/Contents/MacOS/mpv" ${mostMakeWrapperArgs} 101 101 ''; 102 102 103 103 meta = {