Skip to content

Commit 34f1b79

Browse files
sgt0Ichunjo
authored andcommitted
Conditionally use boost charconv
1 parent 8bcd4b1 commit 34f1b79

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [ubuntu-24.04, macos-26]
18+
os: [ubuntu-24.04, macos-15]
1919
llvm: [20, 21, 22]
2020
name: Build os=${{ matrix.os }} llvm=${{ matrix.llvm }}
2121
runs-on: ${{ matrix.os }}

package.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
vapoursynth,
1212
libllvm,
1313
libxml2,
14+
boost,
1415
vapoursynth-lib ? builtins.head vapoursynth.buildInputs,
16+
withBoostCharconv ? stdenv.hostPlatform.isDarwin,
1517
}:
1618
buildPythonPackage {
1719
pname = "vapoursynth-akarin";
@@ -75,16 +77,19 @@ buildPythonPackage {
7577
vapoursynth
7678
];
7779

80+
env.MESON_ARGS = lib.optionalString withBoostCharconv "-Dboost-charconv=true";
81+
7882
buildInputs =
7983
[
8084
libllvm
8185
libxml2.out
8286
vapoursynth-lib
8387
]
88+
++ lib.optional withBoostCharconv boost
8489
# `std::to_chars()` for floating-point types was introduced in macOS 13.3.
8590
# But then `darwinMinVersionHook "13.0"` yields "error: 'from_chars' is
8691
# unavailable: introduced in macOS 26.0".
87-
++ lib.optional stdenv.hostPlatform.isDarwin (darwinMinVersionHook "26.0");
92+
++ lib.optional (stdenv.hostPlatform.isDarwin && !withBoostCharconv) (darwinMinVersionHook "26.0");
8893

8994
dependencies = [
9095
vapoursynth

0 commit comments

Comments
 (0)