Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8af29cc
chore(ci): update workflow for iOS universal video-default build
KangBuilds Jul 15, 2026
f3780b6
ci: upload only iOS XCFramework archive
KangBuilds Jul 15, 2026
8f3b6fc
fix(ci): restore complete iOS build workflow
KangBuilds Jul 15, 2026
a9aa549
ci: build iOS XCFramework on macOS 26
KangBuilds Jul 15, 2026
329f782
build: upgrade FFmpeg to 8.1.2
KangBuilds Jul 17, 2026
f80cb4b
fix: refresh AudioUnit patch
KangBuilds Jul 17, 2026
9e466ca
fix: regenerate mpv patch
KangBuilds Jul 17, 2026
6d01d60
fix: build HarfBuzz with Xcode 26
KangBuilds Jul 17, 2026
e54527c
fix: populate libplacebo submodules
KangBuilds Jul 17, 2026
268ca24
fix: provide libplacebo Vulkan headers
KangBuilds Jul 17, 2026
d8aa97c
build: fix libpng with Xcode 26
KangBuilds Jul 17, 2026
ebf92a0
build: update VP9 patch for FFmpeg 8
KangBuilds Jul 17, 2026
6322372
build: disable AVFoundation on iOS
KangBuilds Jul 17, 2026
d2e155b
build: upgrade libass mbedtls and dav1d
KangBuilds Jul 17, 2026
32d9def
fix: isolate libass ltmain patch
KangBuilds Jul 17, 2026
9f05ba4
fix: pass archive tools to libass
KangBuilds Jul 17, 2026
c93f318
build: upgrade iOS FFmpeg to 8.1.3
KangBuilds Nov 13, 2026
c6838cc
build: name the FFmpeg 8.1.3 artifact v0.2.1
KangBuilds Nov 13, 2026
a490a93
build: upgrade iOS MPV to 0.42.0 with system TLS trust
KangBuilds Nov 13, 2026
9fd48fc
ci: preserve native release archive checksums
KangBuilds Nov 13, 2026
050eaf9
ci: use the Intel macOS pool for universal iOS builds
KangBuilds Nov 13, 2026
c2f8165
ci: build iOS libraries on the Xcode 27 runner
KangBuilds Nov 13, 2026
e22556a
build: preserve bundled libplacebo third-party headers
KangBuilds Nov 13, 2026
224712a
build: require iOS 12 for system TLS support
KangBuilds Nov 13, 2026
4d915c9
build: recognize modern iOS XCFramework platform metadata
KangBuilds Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 61 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ name: ci
on:
push:
branches:
- main
- ios-custom-build
- codex/mpv-0.42.0
tags:
- "*"
pull_request:
branches:
- "*"
workflow_dispatch:

jobs:
ci:
name: ci
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md
runs-on: macos-15
name: iOS universal video-default
runs-on: xcode-27
permissions:
contents: write

steps:
- name: Platform info
run: |
Expand All @@ -43,46 +45,78 @@ jobs:
with:
use-flakehub: false

# See ${workspace}/nix/overlays/xcode.nix
- name: Xcode path
id: xcode_path
run: |
XCODE_PATH=$(realpath /Applications/Xcode_16.1.0.app)
XCODE_PATH=$(realpath "$(xcode-select -p)/../..")
XCODE_VERSION=$("${XCODE_PATH}/Contents/Developer/usr/bin/xcodebuild" -version)
printf '%s\n' "${XCODE_VERSION}"
[[ "${XCODE_VERSION}" == "Xcode 27"* ]]
echo "xcode_path=${XCODE_PATH}" >> "$GITHUB_OUTPUT"

- name: Build iOS universal video-default
env:
XCODE_PATH: ${{ steps.xcode_path.outputs.xcode_path }}
VERSION: ${{ github.ref_type == 'tag' && github.ref_name || 'v0.3.0' }}
run: |
nix develop -c make \
XCODE_PATH="${XCODE_PATH}" \
VERSION="${VERSION}" \
TARGET=mk-out-archive-xcframeworks-ios-universal-video-default

${XCODE_PATH}/Contents/Developer/usr/bin/xcodebuild -version
- name: Inspect artifact size
run: |
ls -lh result/libmpv-xcframeworks_*_ios-universal-video-default.tar.gz
shasum -a 256 result/libmpv-xcframeworks_*_ios-universal-video-default.tar.gz

echo "xcode_path=${XCODE_PATH}" >> $GITHUB_OUTPUT
- name: Verify AV1 VideoToolbox
run: |
mkdir -p "${RUNNER_TEMP}/libmpv"
tar -xzf result/libmpv-xcframeworks_*_ios-universal-video-default.tar.gz \
-C "${RUNNER_TEMP}/libmpv"
find "${RUNNER_TEMP}/libmpv" -path '*/Avcodec.framework/Avcodec' \
-exec strings {} \; | grep -q av1_videotoolbox

- name: Build version
id: version
- name: Verify FFmpeg version
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
VERSION="${GITHUB_REF#refs/tags/}"
fi
find "${RUNNER_TEMP}/libmpv" -path '*/Avutil.framework/Avutil' -print0 |
while IFS= read -r -d '' library; do
strings "${library}" | grep -F 'FFmpeg version 8.1.3'
done

echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Verify XCFramework platforms
run: python3 tests/xcframework_platforms.py "${RUNNER_TEMP}/libmpv"

# See ${workspace}/Makefile
- name: Build
env:
XCODE_PATH: ${{ steps.xcode_path.outputs.xcode_path }}
VERSION: ${{ steps.version.outputs.version }}
- name: Verify MPV version and Apple TLS
run: |
nix develop -c make XCODE_PATH=${XCODE_PATH} VERSION=${VERSION}
find "${RUNNER_TEMP}/libmpv" -path '*/Mpv.framework/Mpv' -print0 |
while IFS= read -r -d '' library; do
strings "${library}" | grep -F 'mpv v0.42.0'
done
find "${RUNNER_TEMP}/libmpv" -path '*/Avformat.framework/Avformat' -print0 |
while IFS= read -r -d '' library; do
otool -L "${library}" | grep -F 'Security.framework'
if otool -L "${library}" | grep -F 'Mbedtls.framework'; then
exit 1
fi
done

- name: Test Apple system certificate trust
run: bash tests/apple_tls.sh

- name: Upload artifacts
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: libmpv-xcframeworks-ios-universal-video-default
if-no-files-found: error
path: |
result/*.tar.gz
result/*.zip
retention-days: 7
compression-level: 0
path: result/libmpv-xcframeworks_*_ios-universal-video-default.tar.gz

- name: Release
uses: softprops/action-gh-release@v3
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
files: |
result/*.tar.gz
result/*.zip
overwrite_files: false
files: result/libmpv-xcframeworks_*_ios-universal-video-default.tar.gz
2 changes: 1 addition & 1 deletion cross-files/ios-arm64.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[constants]
arch = 'arm64'
platform_name = 'iPhoneOS'
min_version = '-miphoneos-version-min=9.0'
min_version = '-miphoneos-version-min=12.0'
xcode = '/Applications/Xcode.app'
xctoolchain = xcode + '/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin'
xcplatform = xcode + '/Contents/Developer/Platforms/' + platform_name + '.platform/Developer/SDKs/' + platform_name + '.sdk'
Expand Down
2 changes: 1 addition & 1 deletion cross-files/iossimulator-amd64.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[constants]
arch = 'x86_64'
platform_name = 'iPhoneSimulator'
min_version = '-miphoneos-version-min=9.0'
min_version = '-miphoneos-version-min=12.0'
xcode = '/Applications/Xcode.app'
xctoolchain = xcode + '/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin'
xcplatform = xcode + '/Contents/Developer/Platforms/' + platform_name + '.platform/Developer/SDKs/' + platform_name + '.sdk'
Expand Down
4 changes: 2 additions & 2 deletions nix/packages/mk-out-libs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if arch != archs.universal then

mpv = callPackage ../mk-pkg-mpv/default.nix { };
ffmpeg = callPackage ../mk-pkg-ffmpeg/default.nix { };
mbedtls = callPackage ../mk-pkg-mbedtls/default.nix { };
libplacebo = callPackage ../mk-pkg-libplacebo/default.nix { };
fftoolsFfi = callPackage ../mk-pkg-fftools-ffi/default.nix { };
libvorbis = callPackage ../mk-pkg-libvorbis/default.nix { };
libogg = callPackage ../mk-pkg-libogg/default.nix { };
Expand All @@ -55,7 +55,7 @@ if arch != archs.universal then
[
mpv
ffmpeg
mbedtls
libplacebo
]
++ pkgs.lib.optionals (flavor == flavors.encodersgpl) [
fftoolsFfi
Expand Down
6 changes: 1 addition & 5 deletions nix/packages/mk-pkg-ffmpeg/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ let
};
nativeFile = callPackage ../../utils/native-file/default.nix { };
crossFile = callPackage ../../utils/cross-file/default.nix { };
mbedtls = callPackage ../mk-pkg-mbedtls/default.nix { };
dav1d = callPackage ../mk-pkg-dav1d/default.nix { };
libxml2 = callPackage ../mk-pkg-libxml2/default.nix { };
libvorbis = callPackage ../mk-pkg-libvorbis/default.nix { };
Expand All @@ -43,9 +42,7 @@ let

cd $src
patch -p1 <${../../../patches/ffmpeg-fix-vp9-hwaccel.patch}
patch -p1 <${../../../patches/ffmpeg-fix-hls-mp4-seek.patch}
patch -p1 <${../../../patches/ffmpeg-fix-ios-hdr-texture.patch}
patch -p1 <${../../../patches/ffmpeg-fix-dash-base-url-escape.patch}
cd -

cp ${./meson.build} $src/meson.build
Expand All @@ -68,8 +65,7 @@ pkgs.stdenvNoCC.mkDerivation {
pkgs.pkg-config
];
buildInputs =
[ mbedtls ]
++ pkgs.lib.optionals (flavor == flavors.encodersgpl) [
pkgs.lib.optionals (flavor == flavors.encodersgpl) [
libvorbis
]
++ pkgs.lib.optionals (variant == variants.video) [
Expand Down
3 changes: 2 additions & 1 deletion nix/packages/mk-pkg-ffmpeg/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ common_options = [
'--enable-network',
'--enable-pthreads',
'--enable-pic',
'--enable-mbedtls', # tls support (mbedtls)
'--enable-securetransport', # TLS with Apple system certificate trust
'--enable-version3',
'--enable-safe-bitstream-reader',
'--enable-stripping',
Expand Down Expand Up @@ -251,6 +251,7 @@ video_default_options = [
'--enable-demuxer=vplayer',

# hwaccels
'--enable-hwaccel=av1_videotoolbox',
'--enable-hwaccel=h263_videotoolbox',
'--enable-hwaccel=h264_videotoolbox',
'--enable-hwaccel=hevc_videotoolbox',
Expand Down
14 changes: 10 additions & 4 deletions nix/packages/mk-pkg-harfbuzz/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ let
name = "${pname}-source-${version}";
inherit (packageLock) url sha256;
};
patchedSource = callPackage ../../utils/patch-shebangs/default.nix {
name = "${pname}-patched-source-${version}";
inherit src;
patchedSource = pkgs.runCommand "${pname}-patched-source-${version}" { } ''
cp -r ${src} src
chmod -R 777 src
patch -d src -p1 <${../../../patches/harfbuzz-fix-apple-sincosf.patch}
cp -r src $out
'';
fixedSource = callPackage ../../utils/patch-shebangs/default.nix {
name = "${pname}-fixed-source-${version}";
src = patchedSource;
inherit nativeBuildInputs;
};
in
Expand All @@ -36,7 +42,7 @@ pkgs.stdenvNoCC.mkDerivation {
name = "${pname}-${os}-${arch}-${version}";
pname = pname;
inherit version;
src = patchedSource;
src = fixedSource;
dontUnpack = true;
enableParallelBuilding = true;
inherit nativeBuildInputs;
Expand Down
2 changes: 1 addition & 1 deletion nix/packages/mk-pkg-libass/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let
chmod -R 777 $src

cd $src
patch -p1 <${../../../patches/ltmain-target-passthrough.patch}
patch -p1 <${../../../patches/libass-ltmain-target-passthrough.patch}
cd -

cp ${./meson.build} $src/meson.build
Expand Down
6 changes: 6 additions & 0 deletions nix/packages/mk-pkg-libass/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
project('libass', 'c')

mod = import('unstable-external_project')
cross_prefix = meson.get_cross_property('cross_prefix')

p = mod.add_project('configure',
env : {
'AR': cross_prefix + '/ar',
'NM': cross_prefix + '/nm',
'RANLIB': cross_prefix + '/ranlib',
},
configure_options : [
'--prefix=@PREFIX@',
'--disable-static',
Expand Down
81 changes: 81 additions & 0 deletions nix/packages/mk-pkg-libplacebo/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
pkgs ? import ../../utils/default/pkgs.nix,
os ? import ../../utils/default/os.nix,
arch ? pkgs.callPackage ../../utils/default/arch.nix { },
}:

let
locks = import ../../../packages.lock.nix;
packageLock = locks.libplacebo;
inherit (packageLock) version;

callPackage = pkgs.lib.callPackageWith { inherit pkgs os arch; };
nativeFile = callPackage ../../utils/native-file/default.nix { };
crossFile = callPackage ../../utils/cross-file/default.nix { };
fetch = name: lock: callPackage ../../utils/fetch-tarball/default.nix {
name = "${name}-source-${lock.version}";
inherit (lock) url sha256;
};

pname = import ../../utils/name/package.nix "libplacebo";
src = fetch pname packageLock;
fastFloat = fetch "fast-float" locks.fast_float;
glad = fetch "glad" locks.glad;
jinja = fetch "jinja" locks.jinja;
markupsafe = fetch "markupsafe" locks.markupsafe;
vulkanHeaders = fetch "vulkan-headers" locks.vulkan_headers;
source = pkgs.runCommand "${pname}-source-with-submodules-${version}" { } ''
cp -r ${src} src
chmod -R 777 src
rm -rf src/3rdparty/{fast_float,glad,jinja,markupsafe,Vulkan-Headers}
mkdir -p src/3rdparty
cp -r ${fastFloat} src/3rdparty/fast_float
cp -r ${glad} src/3rdparty/glad
cp -r ${jinja} src/3rdparty/jinja
cp -r ${markupsafe} src/3rdparty/markupsafe
cp -r ${vulkanHeaders} src/3rdparty/Vulkan-Headers
cp -r src $out
'';
in

pkgs.stdenvNoCC.mkDerivation {
name = "${pname}-${os}-${arch}-${version}";
inherit pname version;
src = source;
dontUnpack = true;
enableParallelBuilding = true;
nativeBuildInputs = [
pkgs.meson
pkgs.ninja
pkgs.pkg-config
pkgs.python3
];
configurePhase = ''
meson setup build $src \
--native-file ${nativeFile} \
--cross-file ${crossFile} \
--prefix=$out \
-Ddefault_library=shared \
-Ddemos=false \
-Dtests=false \
-Dbench=false \
-Dfuzz=false \
-Dvulkan=disabled \
-Dopengl=enabled \
-Dgl-proc-addr=disabled \
-Dd3d11=disabled \
-Dglslang=disabled \
-Dshaderc=disabled \
-Dlcms=disabled \
-Ddovi=disabled \
-Dlibdovi=disabled \
-Dunwind=disabled \
-Dxxhash=disabled
'';
buildPhase = ''
meson compile -vC build
'';
installPhase = ''
meson install -C build
'';
}
1 change: 1 addition & 0 deletions nix/packages/mk-pkg-libplacebo/targets.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import ../../utils/targets/pkgs.nix
3 changes: 3 additions & 0 deletions nix/packages/mk-pkg-libpng/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ let
unzip ${libpngPatch} -d libpng-patch
rsync -a libpng-patch/libpng-*/ $src/

# Xcode 26 no longer ships the legacy fp.h selected by libpng 1.6.40.
patch -d $src -p1 < ${./use-math-h-on-apple.patch}

cp -r $src $out
'';
in
Expand Down
18 changes: 18 additions & 0 deletions nix/packages/mk-pkg-libpng/use-math-h-on-apple.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/pngpriv.h b/pngpriv.h
index 6c05fb162..aa4d1e569 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -517,12 +517 @@
-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
- /* We need to check that <math.h> hasn't already been included earlier
- * as it seems it doesn't agree with <fp.h>, yet we should really use
- * <fp.h> if possible.
- */
-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
-# include <fp.h>
-# endif
-# else
-# include <math.h>
-# endif
+# include <math.h>
Loading