nix: update to Nix 25.05 and Zig 0.14.1

Update to Nix 25.05 which gets us GTK 4.18, libadwaita 1.7, and Zig 0.14.1.

Since Nix updated to Zig 0.14.1, the devshell has been switched to Zig 0.14.1
from zig-overlay as well.

Fixes #7305
This commit is contained in:
Jeffrey C. Ollie
2025-05-26 10:47:43 -05:00
parent 3f6c02b49e
commit 98309e3226
2 changed files with 34 additions and 62 deletions

54
flake.lock generated
View File

@ -3,11 +3,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
@ -34,44 +34,24 @@
"type": "github"
}
},
"nixpkgs-stable": {
"nixpkgs": {
"locked": {
"lastModified": 1741992157,
"narHash": "sha256-nlIfTsTrMSksEJc1f7YexXiPVuzD1gOfeN1ggwZyUoc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "da4b122f63095ca1199bd4d526f9e26426697689",
"type": "github"
"lastModified": 1748189127,
"narHash": "sha256-zRDR+EbbeObu4V2X5QCd2Bk5eltfDlCr5yvhBwUT6pY=",
"rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.802491.7c43f080a7f2/nixexprs.tar.xz"
},
"original": {
"owner": "nixos",
"ref": "release-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1741865919,
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
"type": "tarball",
"url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz"
}
},
"root": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixpkgs": "nixpkgs",
"zig": "zig",
"zon2nix": "zon2nix"
}
@ -98,15 +78,15 @@
"flake-utils"
],
"nixpkgs": [
"nixpkgs-stable"
"nixpkgs"
]
},
"locked": {
"lastModified": 1741825901,
"narHash": "sha256-aeopo+aXg5I2IksOPFN79usw7AeimH1+tjfuMzJHFdk=",
"lastModified": 1748261582,
"narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "0b14285e283f5a747f372fb2931835dd937c4383",
"rev": "aafb1b093fb838f7a02613b719e85ec912914221",
"type": "github"
},
"original": {
@ -121,7 +101,7 @@
"flake-utils"
],
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs"
]
},
"locked": {

View File

@ -2,12 +2,10 @@
description = "👻";
inputs = {
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# We want to stay as up to date as possible but need to be careful that the
# glibc versions used by our dependencies from Nix are compatible with the
# system glibc that the user is building for.
nixpkgs-stable.url = "github:nixos/nixpkgs/release-24.11";
nixpkgs.url = "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz";
flake-utils.url = "github:numtide/flake-utils";
# Used for shell.nix
@ -19,7 +17,7 @@
zig = {
url = "github:mitchellh/zig-overlay";
inputs = {
nixpkgs.follows = "nixpkgs-stable";
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
flake-compat.follows = "";
};
@ -28,7 +26,7 @@
zon2nix = {
url = "github:jcollie/zon2nix?ref=56c159be489cc6c0e73c3930bd908ddc6fe89613";
inputs = {
nixpkgs.follows = "nixpkgs-unstable";
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
@ -36,24 +34,19 @@
outputs = {
self,
nixpkgs-unstable,
nixpkgs-stable,
nixpkgs,
zig,
zon2nix,
...
}:
builtins.foldl' nixpkgs-stable.lib.recursiveUpdate {} (
builtins.foldl' nixpkgs.lib.recursiveUpdate {} (
builtins.map (
system: let
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
pkgs = nixpkgs.legacyPackages.${system};
in {
devShell.${system} = pkgs-stable.callPackage ./nix/devShell.nix {
zig = zig.packages.${system}."0.14.0";
wraptest = pkgs-stable.callPackage ./nix/wraptest.nix {};
uv = pkgs-unstable.uv;
# remove once blueprint-compiler 0.16.0 is in the stable nixpkgs
blueprint-compiler = pkgs-unstable.blueprint-compiler;
devShell.${system} = pkgs.callPackage ./nix/devShell.nix {
zig = zig.packages.${system}."0.14.1";
wraptest = pkgs.callPackage ./nix/wraptest.nix {};
zon2nix = zon2nix;
};
@ -64,30 +57,29 @@
revision = self.shortRev or self.dirtyShortRev or "dirty";
};
in rec {
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");
deps = pkgs.callPackage ./build.zig.zon.nix {};
ghostty-debug = pkgs.callPackage ./nix/package.nix (mkArgs "Debug");
ghostty-releasesafe = pkgs.callPackage ./nix/package.nix (mkArgs "ReleaseSafe");
ghostty-releasefast = pkgs.callPackage ./nix/package.nix (mkArgs "ReleaseFast");
ghostty = ghostty-releasefast;
default = ghostty;
};
formatter.${system} = pkgs-stable.alejandra;
formatter.${system} = pkgs.alejandra;
apps.${system} = let
runVM = (
module: let
vm = import ./nix/vm/create.nix {
inherit system module;
nixpkgs = nixpkgs-unstable;
inherit system module nixpkgs;
overlay = self.overlays.debug;
};
program = pkgs-unstable.writeShellScript "run-ghostty-vm" ''
program = pkgs.writeShellScript "run-ghostty-vm" ''
SHARED_DIR=$(pwd)
export SHARED_DIR
${pkgs-unstable.lib.getExe vm.config.system.build.vm} "$@"
${pkgs.lib.getExe vm.config.system.build.vm} "$@"
'';
in {
type = "app";