update zig2nix

This commit is contained in:
Mitchell Hashimoto
2025-03-12 15:55:12 -07:00
parent 99bde549af
commit b123b14686
5 changed files with 24 additions and 24 deletions

View File

@ -13,8 +13,8 @@
}, },
.mach_glfw = .{ .mach_glfw = .{
// mitchellh/mach-glfw // mitchellh/mach-glfw
.url = "https://github.com/mitchellh/mach-glfw/archive/112fc46340f5c8527e072e442e0375004303e82b.zip", .url = "https://github.com/mitchellh/mach-glfw/archive/0e4bfc8b87ea5074d6f8c37f97dde282e877d0b0.zip",
.hash = "mach_glfw-0.2.0-EJSQm1k9BQCb1H4mCkgfnBtG7K488_YnUMr2tz45YQ5u", .hash = "mach_glfw-0.2.0-EJSQm1k9BQA-5D0o_o6MszXdPy-aSlYp4j3HLEafE4Sh",
.lazy = true, .lazy = true,
}, },
.vaxis = .{ .vaxis = .{
@ -24,8 +24,8 @@
}, },
.z2d = .{ .z2d = .{
// vancluever/z2d // vancluever/z2d
.url = "https://github.com/vancluever/z2d/archive/03f6ef642e696dce8c6019d4365234d9538eea5d.tar.gz", .url = "https://github.com/vancluever/z2d/archive/1e89605a624940c310c7a1d81b46a7c5c05919e3.tar.gz",
.hash = "z2d-0.1.0-AAAAAMz7BwCFCN76WmSoRhlTe8ZOgPMmG44AyXxBEpHs", .hash = "z2d-0.6.0-j5P_HvLdCABu-dXpCeRM7Uk4m16vULg1980lMNCQj4_C",
}, },
.zig_objc = .{ .zig_objc = .{
// mitchellh/zig-objc // mitchellh/zig-objc

16
flake.lock generated
View File

@ -52,11 +52,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1738136902, "lastModified": 1741708242,
"narHash": "sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw=", "narHash": "sha256-cNRqdQD4sZpN7JLqxVOze4+WsWTmv2DGH0wNCOVwrWc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9a5db3142ce450045840cc8d832b13b8a2018e0c", "rev": "b62d2a95c72fb068aecd374a7262b37ed92df82b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -121,20 +121,20 @@
"flake-utils" "flake-utils"
], ],
"nixpkgs": [ "nixpkgs": [
"nixpkgs-stable" "nixpkgs-unstable"
] ]
}, },
"locked": { "locked": {
"lastModified": 1741368279, "lastModified": 1741816255,
"narHash": "sha256-WTaC8HmnIq6O71iK0g9as404BbmS+YyEP5qS85m2JBY=", "narHash": "sha256-SJQMnm1vwXy8Td2qp/omjybn+4xZ/MDdZHeK6aa2nb0=",
"owner": "jcollie", "owner": "jcollie",
"repo": "zig2nix", "repo": "zig2nix",
"rev": "672971b5b6911de21446ad4fc76dee677922eda0", "rev": "c2a24405298373123e12ca81805e436da648aaf5",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "jcollie", "owner": "jcollie",
"ref": "672971b5b6911de21446ad4fc76dee677922eda0", "ref": "c2a24405298373123e12ca81805e436da648aaf5",
"repo": "zig2nix", "repo": "zig2nix",
"type": "github" "type": "github"
} }

View File

@ -26,9 +26,9 @@
}; };
zig2nix = { zig2nix = {
url = "github:jcollie/zig2nix?ref=672971b5b6911de21446ad4fc76dee677922eda0"; url = "github:jcollie/zig2nix?ref=c2a24405298373123e12ca81805e436da648aaf5";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs-stable"; nixpkgs.follows = "nixpkgs-unstable";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
}; };
}; };
@ -61,10 +61,10 @@
revision = self.shortRev or self.dirtyShortRev or "dirty"; revision = self.shortRev or self.dirtyShortRev or "dirty";
}; };
in rec { in rec {
deps = pkgs-stable.callPackage ./build.zig.zon.nix {}; deps = pkgs-unstable.callPackage ./build.zig.zon.nix {};
ghostty-debug = pkgs-stable.callPackage ./nix/package.nix (mkArgs "Debug"); ghostty-debug = pkgs-unstable.callPackage ./nix/package.nix (mkArgs "Debug");
ghostty-releasesafe = pkgs-stable.callPackage ./nix/package.nix (mkArgs "ReleaseSafe"); ghostty-releasesafe = pkgs-unstable.callPackage ./nix/package.nix (mkArgs "ReleaseSafe");
ghostty-releasefast = pkgs-stable.callPackage ./nix/package.nix (mkArgs "ReleaseFast"); ghostty-releasefast = pkgs-unstable.callPackage ./nix/package.nix (mkArgs "ReleaseFast");
ghostty = ghostty-releasefast; ghostty = ghostty-releasefast;
default = ghostty; default = ghostty;
@ -77,14 +77,14 @@
module: let module: let
vm = import ./nix/vm/create.nix { vm = import ./nix/vm/create.nix {
inherit system module; inherit system module;
nixpkgs = nixpkgs-stable; nixpkgs = nixpkgs-unstable;
overlay = self.overlays.debug; overlay = self.overlays.debug;
}; };
program = pkgs-stable.writeShellScript "run-ghostty-vm" '' program = pkgs-unstable.writeShellScript "run-ghostty-vm" ''
SHARED_DIR=$(pwd) SHARED_DIR=$(pwd)
export SHARED_DIR export SHARED_DIR
${pkgs-stable.lib.getExe vm.config.system.build.vm} "$@" ${pkgs-unstable.lib.getExe vm.config.system.build.vm} "$@"
''; '';
in { in {
type = "app"; type = "app";

View File

@ -70,7 +70,7 @@ elif [ "$1" != "--update" ]; then
help help
exit 1 exit 1
else else
jq -r '.[] .url' "$BUILD_ZIG_ZON_LOCK" | sort > "$BUILD_ZIG_ZON_TXT" jq -r '.[] .url' "$BUILD_ZIG_ZON_LOCK" | LANG=C sort > "$BUILD_ZIG_ZON_TXT"
mv "$WORK_DIR/build.zig.zon.nix" "$BUILD_ZIG_ZON_NIX" mv "$WORK_DIR/build.zig.zon.nix" "$BUILD_ZIG_ZON_NIX"
echo -e "\nOK: build.zig.zon.nix updated." echo -e "\nOK: build.zig.zon.nix updated."
exit 0 exit 0

View File

@ -24,7 +24,7 @@
git, git,
ncurses, ncurses,
pkg-config, pkg-config,
zig_0_13, zig_0_14,
pandoc, pandoc,
revision ? "dirty", revision ? "dirty",
optimize ? "Debug", optimize ? "Debug",
@ -45,7 +45,7 @@
# https://github.com/ziglang/zig/issues/14281#issuecomment-1624220653 is # https://github.com/ziglang/zig/issues/14281#issuecomment-1624220653 is
# ultimately acted on and has made its way to a nixpkgs implementation, this # ultimately acted on and has made its way to a nixpkgs implementation, this
# can probably be removed in favor of that. # can probably be removed in favor of that.
zig_hook = zig_0_13.hook.overrideAttrs { zig_hook = zig_0_14.hook.overrideAttrs {
zig_default_flags = "-Dcpu=baseline -Doptimize=${optimize} --color off"; zig_default_flags = "-Dcpu=baseline -Doptimize=${optimize} --color off";
}; };
in in