diff --git a/build.zig b/build.zig index ae724d7..ab58121 100644 --- a/build.zig +++ b/build.zig @@ -1,4 +1,17 @@ const std = @import("std"); +const builtin = @import("builtin"); + +comptime { + const required_zig = "0.12.0-dev.2150+63de8a598"; + const current_zig = builtin.zig_version; + const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable; + if (current_zig.order(min_zig) == .lt) { + @compileError(std.fmt.comptimePrint( + "Your Zig version v{} does not meet the minimum build requirement of v{}", + .{ current_zig, min_zig }, + )); + } +} // Although this function looks imperative, note that its job is to // declaratively construct a build graph that will be executed by an external diff --git a/flake.lock b/flake.lock index 04ee039..974dc1c 100644 --- a/flake.lock +++ b/flake.lock @@ -71,11 +71,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1704161960, - "narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=", + "lastModified": 1704842529, + "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "63143ac2c9186be6d9da6035fa22620018c85932", + "rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", "type": "github" }, "original": { @@ -117,11 +117,11 @@ ] }, "locked": { - "lastModified": 1704542888, - "narHash": "sha256-Fb8tc4cXUkWw+Fva6JKbjkFFpZwu4c+ictSAQGEYjIM=", + "lastModified": 1705040559, + "narHash": "sha256-6SjLyxWAVMfVfkz2x/3IlAJBJ0ywus6Hr9JrBbT9zCk=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "112cfb72e47cb85d17fc8075a4d70ab56964453d", + "rev": "6022b38d2fd4e7504f1e8b6dcfccab9b655764a9", "type": "github" }, "original": {