Skip to content

Commit

Permalink
warn about older darwinSdkVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudef committed Jan 15, 2024
1 parent e03e508 commit 80b23c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ rec {
zigTripleFromPlatform = p: let
system = mkZigSystemFromString p.config;
in {
darwin = "${system.zig.cpu}-${system.zig.kernel}.${p.darwinSdkVersion}-${system.zig.abi}";
darwin = let
sdkVer =
if (versionAtLeast p.darwinSdkVersion "10.13") then p.darwinSdkVersion
else warn "zig only supports macOS 10.13+, forcing darwinSdkVersion to 10.13" "10.13";
in "${system.zig.cpu}-${system.zig.kernel}.${sdkVer}-${system.zig.abi}";
}.${system.kernel.name} or (zigTripleFromSystem system);

# helper for resolving final target for building a package from derivation attrs
Expand Down

0 comments on commit 80b23c9

Please sign in to comment.