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

16
flake.lock generated
View File

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

View File

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

View File

@ -70,7 +70,7 @@ elif [ "$1" != "--update" ]; then
help
exit 1
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"
echo -e "\nOK: build.zig.zon.nix updated."
exit 0

View File

@ -24,7 +24,7 @@
git,
ncurses,
pkg-config,
zig_0_13,
zig_0_14,
pandoc,
revision ? "dirty",
optimize ? "Debug",
@ -45,7 +45,7 @@
# https://github.com/ziglang/zig/issues/14281#issuecomment-1624220653 is
# ultimately acted on and has made its way to a nixpkgs implementation, this
# 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";
};
in